|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sibvisions.rad.util.DirectObjectConnection
public class DirectObjectConnection
The DirectObjectConnection enables direct object calls without the need of a server.
It's possible to use the original client implementation and pass server and lifecycle objects. But
it is important to specify all needed server objects by name (manual lifecycle handling).
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
DirectObjectConnection()
Creates a new instance of DirectObjectConnection without any object. |
|
DirectObjectConnection(java.util.Map<java.lang.String,java.lang.Object> pObjects)
Creates a new instance of DirectObjectConnection with predefined objects. |
|
| Method Summary | |
|---|---|
void |
addCallBackResultListener(ICallBackResultListener pListener)
Adds an ICallBackResultListener to the list of registered listeners. |
void |
addPropertyChangedListener(IConnectionPropertyChangedListener pListener)
Adds an IConnectionPropertyChangedListener to the list of registered listeners. |
java.lang.Object[] |
call(ConnectionInfo pConnectionInfo,
java.lang.String[] pObjectName,
java.lang.String[] pMethod,
java.lang.Object[][] pParams,
ICallBackListener[] pCallBack)
Calls a list of methods from objects identified by name(s). |
void |
close(ConnectionInfo pConnectionInfo)
Close the connection to the server. |
java.lang.Object |
get(java.lang.String pName)
Gets a specific object from the list of known objects. |
java.util.Hashtable<java.lang.String,java.lang.Object> |
getProperties(ConnectionInfo pConnectionInfo)
Gets a clone of all connection properties. |
java.lang.Object |
getProperty(ConnectionInfo pConnectionInfo,
java.lang.String pName)
Gets a connection property. |
boolean |
isCalling()
Gets whether a call is active. |
boolean |
isOpen(ConnectionInfo pConnectionInfo)
The connection is always open. |
void |
open(ConnectionInfo pConnectionInfo)
Sets a random connection ID. |
void |
openSub(ConnectionInfo pConnectionInfo,
ConnectionInfo pConnectionInfoSub)
Sets a random connection ID for the sub connection. |
java.lang.Object |
put(java.lang.String pName,
java.lang.Object pObject)
Puts an object to the list of known objects. |
java.lang.Object |
remove(java.lang.String pName)
Removes an object from the list of known objects. |
void |
removeCallBackResultListener(ICallBackResultListener pListener)
Removes an ICallBackResultListener from the list of registered listeners. |
void |
removePropertyChangedListener(IConnectionPropertyChangedListener pListener)
Removes an IConnectionPropertyChangedListener from the list of registered listeners. |
void |
reopen(ConnectionInfo pConnectionInfo)
Not supported. |
ConnectionInfo[] |
setAndCheckAlive(ConnectionInfo pConnectionInfo,
ConnectionInfo[] pSubConnections)
Returns null. |
void |
setNewPassword(ConnectionInfo pConnectionInfo,
java.lang.String pOldPassword,
java.lang.String pNewPassword)
Sets a new password for the connected user. |
void |
setProperty(ConnectionInfo pConnectionInfo,
java.lang.String pName,
java.lang.Object pValue)
Sets a connection property. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DirectObjectConnection()
DirectObjectConnection without any object.
public DirectObjectConnection(java.util.Map<java.lang.String,java.lang.Object> pObjects)
DirectObjectConnection with predefined objects.
pObjects - the initial objects.| Method Detail |
|---|
public java.lang.Object[] call(ConnectionInfo pConnectionInfo,
java.lang.String[] pObjectName,
java.lang.String[] pMethod,
java.lang.Object[][] pParams,
ICallBackListener[] pCallBack)
throws java.lang.Throwable
call in interface IConnectionpConnectionInfo - the connection infopObjectName - the object namespMethod - the method namespParams - the method paramspCallBack - the callback listeners
java.lang.Throwable - if an exception occurspublic boolean isCalling()
isCalling in interface IConnectiontrue if a call is active, false otherwise
public void close(ConnectionInfo pConnectionInfo)
throws java.lang.Throwable
close in interface IConnectionpConnectionInfo - the connection information
java.lang.Throwable - if the connection can not be established
public java.util.Hashtable<java.lang.String,java.lang.Object> getProperties(ConnectionInfo pConnectionInfo)
throws java.lang.Throwable
getProperties in interface IConnectionpConnectionInfo - the connection information
Hashtable with property names and values
java.lang.Throwable - communication error, security checks, invalid method, ...
public java.lang.Object getProperty(ConnectionInfo pConnectionInfo,
java.lang.String pName)
throws java.lang.Throwable
getProperty in interface IConnectionpConnectionInfo - the connection informationpName - the property name
null if the property is not set
java.lang.Throwable - communication error, security checks, invalid method, ...public boolean isOpen(ConnectionInfo pConnectionInfo)
isOpen in interface IConnectionpConnectionInfo - the connection info
truepublic void open(ConnectionInfo pConnectionInfo)
open in interface IConnectionpConnectionInfo - the connection info
public void openSub(ConnectionInfo pConnectionInfo,
ConnectionInfo pConnectionInfoSub)
openSub in interface IConnectionpConnectionInfo - the connection infopConnectionInfoSub - the sub connection infopublic void reopen(ConnectionInfo pConnectionInfo)
pConnectionInfo - the connection info
public ConnectionInfo[] setAndCheckAlive(ConnectionInfo pConnectionInfo,
ConnectionInfo[] pSubConnections)
null.
setAndCheckAlive in interface IConnectionpConnectionInfo - the connection infopSubConnections - the current sub connection infos
null
public void setNewPassword(ConnectionInfo pConnectionInfo,
java.lang.String pOldPassword,
java.lang.String pNewPassword)
throws java.lang.Throwable
setNewPassword in interface IConnectionpConnectionInfo - the connection informationpOldPassword - the old passwordpNewPassword - the new password
java.lang.Throwable - communication error, security checks, invalid method, ...
public void setProperty(ConnectionInfo pConnectionInfo,
java.lang.String pName,
java.lang.Object pValue)
throws java.lang.Throwable
setProperty in interface IConnectionpConnectionInfo - the connection informationpName - the property namepValue - the value of the property or null to delete the property
java.lang.Throwable - communication error, security checks, invalid method, ...
java.lang.SecurityException - if it's not allowed to set the propertypublic void addPropertyChangedListener(IConnectionPropertyChangedListener pListener)
IConnectionPropertyChangedListener to the list of registered listeners.
addPropertyChangedListener in interface IConnectionpListener - the new property changed listener.public void removePropertyChangedListener(IConnectionPropertyChangedListener pListener)
IConnectionPropertyChangedListener from the list of registered listeners.
removePropertyChangedListener in interface IConnectionpListener - the property changed listener to removepublic void addCallBackResultListener(ICallBackResultListener pListener)
ICallBackResultListener to the list of registered listeners.
addCallBackResultListener in interface IConnectionpListener - the new callback result listener.public void removeCallBackResultListener(ICallBackResultListener pListener)
ICallBackResultListener from the list of registered listeners.
removeCallBackResultListener in interface IConnectionpListener - the callback result listener to remove
public java.lang.Object put(java.lang.String pName,
java.lang.Object pObject)
pName - the object namepObject - the object or null to remove the object with the specified name
public java.lang.Object get(java.lang.String pName)
pName - the object name
null if object wasn't foundpublic java.lang.Object remove(java.lang.String pName)
pName - the object name
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||