|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IConnection
The IConnection
interface defines all methods for
the communication between client and server.
Field Summary | |
---|---|
static int |
COMPRESSION_BYTES
the max. bytes for uncompressed communication (more bytes switches to compressed mode). |
static int |
FLAG_ACKNOWLEDGE
the acknowledge flag. |
static int |
FLAG_BROKEN
the broken flag. |
static int |
FLAG_ESTABLISHED
the established flag. |
static String |
MET_SESSION_CREATE
Constant for the session create method. |
static String |
MET_SESSION_DESTROY
Constant for the session destroy method. |
static String |
MET_SESSION_GET_PROPERTIES
Constant for the get properties method. |
static String |
MET_SESSION_GET_PROPERTY
Constant for the get property method. |
static String |
MET_SESSION_SET_NEW_PASSWORD
Constant for the set new password method. |
static String |
MET_SESSION_SET_PROPERTY
Constant for the set property method. |
static String |
MET_SESSION_SETCHECKALIVE
Constant for the set and check of the session alive state. |
static String |
MET_SESSION_SUBSESSION_CREATE
Constant for the sub session create method. |
static int |
MODE_COMPRESSED
Constant type for compressed communication. |
static int |
MODE_UNCOMPRESSED
Constant type for uncompressed communication. |
static String |
OBJ_SESSION
Constant for the internal session handler. |
static byte |
TYPE_CALL_ERROR
Constant type for exception return values. |
static byte |
TYPE_CALL_RESULT
Constant type for return values from remote method calls. |
static byte |
TYPE_CALLBACK_ERROR
Constant type for failed callback remote method calls. |
static byte |
TYPE_CALLBACK_RESULT
Constant type for successful callback remote method calls. |
static byte |
TYPE_PROPERTY_RESULT
Constant type for properties from the server. |
Method Summary | |
---|---|
Object[] |
call(ConnectionInfo pConnectionInfo,
String[] pObjectName,
String[] pMethod,
Object[][] pParams,
ICallBackListener[] pCallBack)
Calls desired methods from a remote server object. |
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)
Checks if the connection to the server is opened. |
void |
open(ConnectionInfo pConnectionInfo)
Opens the connection to the server. |
void |
openSub(ConnectionInfo pConnectionInfo,
ConnectionInfo pConnectionInfoSub)
Opens a new sub connection. |
void |
reopen(ConnectionInfo pConnectionInfo)
Closes and opens the connection to the server. |
ConnectionInfo[] |
setAndCheckAlive(ConnectionInfo pConnectionInfo,
ConnectionInfo[] pSubConnections)
Sets the alive state for a connection, on the server, and validates the alive state of subconnections. |
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. |
Field Detail |
---|
static final int COMPRESSION_BYTES
static final int MODE_UNCOMPRESSED
static final int MODE_COMPRESSED
static final int FLAG_ACKNOWLEDGE
static final int FLAG_ESTABLISHED
static final int FLAG_BROKEN
static final byte TYPE_CALLBACK_RESULT
static final byte TYPE_CALLBACK_ERROR
static final byte TYPE_CALL_RESULT
static final byte TYPE_CALL_ERROR
static final byte TYPE_PROPERTY_RESULT
static final String OBJ_SESSION
static final String MET_SESSION_CREATE
static final String MET_SESSION_SUBSESSION_CREATE
static final String MET_SESSION_DESTROY
static final String MET_SESSION_SET_PROPERTY
static final String MET_SESSION_GET_PROPERTY
static final String MET_SESSION_GET_PROPERTIES
static final String MET_SESSION_SETCHECKALIVE
static final String MET_SESSION_SET_NEW_PASSWORD
Method Detail |
---|
void open(ConnectionInfo pConnectionInfo) throws Throwable
pConnectionInfo
- the connection information
Throwable
- if the connection can not be establishedvoid openSub(ConnectionInfo pConnectionInfo, ConnectionInfo pConnectionInfoSub) throws Throwable
pConnectionInfo
- the connection information of the master connectionpConnectionInfoSub
- the connection information of the sub connection
Throwable
- communication error, security checks, invalid method, ...boolean isOpen(ConnectionInfo pConnectionInfo)
pConnectionInfo
- the connection information
void close(ConnectionInfo pConnectionInfo) throws Throwable
pConnectionInfo
- the connection information
Throwable
- if the connection can not be establishedvoid reopen(ConnectionInfo pConnectionInfo) throws Throwable
pConnectionInfo
- the connection information
Throwable
- if the connection can not be establishedObject[] call(ConnectionInfo pConnectionInfo, String[] pObjectName, String[] pMethod, Object[][] pParams, ICallBackListener[] pCallBack) throws Throwable
pConnectionInfo
- the connection informationpObjectName
- list of server object names/aliasespMethod
- method names which should be calledpParams
- parameters for the method callspCallBack
- callback listeners for asynchronous or null for synchronous calls
Throwable
- communication error, security checks, invalid method, ...boolean isCalling()
true
if a call is active, false
otherwiseConnectionInfo[] setAndCheckAlive(ConnectionInfo pConnectionInfo, ConnectionInfo[] pSubConnections) throws Throwable
pConnectionInfo
- the connection informationpSubConnections
- the connection information of the sub connections, for the alive validation
Throwable
- communication error, security checks, invalid method, ...void setProperty(ConnectionInfo pConnectionInfo, String pName, Object pValue) throws Throwable
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 propertyObject getProperty(ConnectionInfo pConnectionInfo, String pName) throws Throwable
pConnectionInfo
- the connection informationpName
- the property name
null
if the property is not set
Throwable
- communication error, security checks, invalid method, ...Hashtable<String,Object> getProperties(ConnectionInfo pConnectionInfo) throws Throwable
pConnectionInfo
- the connection information
Hashtable
with property names and values
Throwable
- communication error, security checks, invalid method, ...void setNewPassword(ConnectionInfo pConnectionInfo, String pOldPassword, String pNewPassword) throws Throwable
pConnectionInfo
- the connection informationpOldPassword
- the old passwordpNewPassword
- the new password
Throwable
- communication error, security checks, invalid method, ...
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |