|
||||||||||
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(Map<String,Object> pObjects)
Creates a new instance of DirectObjectConnection with predefined objects. |
Method Summary | |
---|---|
Object[] |
call(ConnectionInfo pConnectionInfo,
String[] pObjectName,
String[] pMethod,
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. |
Hashtable<String,Object> |
getProperties(ConnectionInfo pConnectionInfo)
Gets a clone of all connection properties. |
Object |
getProperty(ConnectionInfo pConnectionInfo,
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. |
Object |
put(String pName,
Object pObject)
Puts an object to the list of known objects. |
Object |
remove(String pName)
Removes an object from the list of known objects. |
void |
reopen(ConnectionInfo pConnectionInfo)
Not supported. |
ConnectionInfo[] |
setAndCheckAlive(ConnectionInfo pConnectionInfo,
ConnectionInfo[] pSubConnections)
Returns null . |
void |
setNewPassword(ConnectionInfo pConnectionInfo,
String pOldPassword,
String pNewPassword)
Sets a new password for the connected user. |
void |
setProperty(ConnectionInfo pConnectionInfo,
String pName,
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(Map<String,Object> pObjects)
DirectObjectConnection
with predefined objects.
pObjects
- the initial objects.Method Detail |
---|
public Object[] call(ConnectionInfo pConnectionInfo, String[] pObjectName, String[] pMethod, Object[][] pParams, ICallBackListener[] pCallBack) throws Throwable
call
in interface IConnection
pConnectionInfo
- the connection infopObjectName
- the object namespMethod
- the method namespParams
- the method paramspCallBack
- the callback listeners
Throwable
- if an exception occurspublic boolean isCalling()
isCalling
in interface IConnection
true
if a call is active, false
otherwisepublic void close(ConnectionInfo pConnectionInfo) throws Throwable
close
in interface IConnection
pConnectionInfo
- the connection information
Throwable
- if the connection can not be establishedpublic Hashtable<String,Object> getProperties(ConnectionInfo pConnectionInfo) throws Throwable
getProperties
in interface IConnection
pConnectionInfo
- the connection information
Hashtable
with property names and values
Throwable
- communication error, security checks, invalid method, ...public Object getProperty(ConnectionInfo pConnectionInfo, String pName) throws Throwable
getProperty
in interface IConnection
pConnectionInfo
- the connection informationpName
- the property name
null
if the property is not set
Throwable
- communication error, security checks, invalid method, ...public boolean isOpen(ConnectionInfo pConnectionInfo)
isOpen
in interface IConnection
pConnectionInfo
- the connection info
true
public void open(ConnectionInfo pConnectionInfo)
open
in interface IConnection
pConnectionInfo
- the connection infopublic void openSub(ConnectionInfo pConnectionInfo, ConnectionInfo pConnectionInfoSub)
openSub
in interface IConnection
pConnectionInfo
- the connection infopConnectionInfoSub
- the sub connection infopublic void reopen(ConnectionInfo pConnectionInfo)
reopen
in interface IConnection
pConnectionInfo
- the connection infopublic ConnectionInfo[] setAndCheckAlive(ConnectionInfo pConnectionInfo, ConnectionInfo[] pSubConnections)
null
.
setAndCheckAlive
in interface IConnection
pConnectionInfo
- the connection infopSubConnections
- the current sub connection infos
null
public void setNewPassword(ConnectionInfo pConnectionInfo, String pOldPassword, String pNewPassword) throws Throwable
setNewPassword
in interface IConnection
pConnectionInfo
- the connection informationpOldPassword
- the old passwordpNewPassword
- the new password
Throwable
- communication error, security checks, invalid method, ...public void setProperty(ConnectionInfo pConnectionInfo, String pName, Object pValue) throws Throwable
setProperty
in interface IConnection
pConnectionInfo
- the connection informationpName
- the property namepValue
- the value of the property or null
to delete the property
Throwable
- communication error, security checks, invalid method, ...
SecurityException
- if it's not allowed to set the propertypublic Object put(String pName, Object pObject)
pName
- the object namepObject
- the object or null
to remove the object with the specified name
public Object remove(String pName)
pName
- the object name
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |