|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sibvisions.rad.server.DirectServerConnection
public class DirectServerConnection
The DirectServerConnection
is an IConnection
implementation for
a direct server communication. The calls will be sent to the server without
serialization.
Field Summary |
---|
Constructor Summary | |
---|---|
DirectServerConnection()
Creates a new instance of DirectServerConnection with a new Server instance. |
|
DirectServerConnection(IDirectServer pServer)
Creates a new instance of DirectServerConnection for a IDirectServer implementation. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DirectServerConnection()
DirectServerConnection
with a new Server
instance.
public DirectServerConnection(IDirectServer pServer)
DirectServerConnection
for a IDirectServer
implementation.
pServer
- the serverMethod Detail |
---|
public void open(ConnectionInfo pConnectionInfo) throws Throwable
open
in interface IConnection
pConnectionInfo
- the connection information
Throwable
- if the connection can not be establishedpublic void openSub(ConnectionInfo pConnectionInfo, ConnectionInfo pConnectionInfoSub) throws Throwable
openSub
in interface IConnection
pConnectionInfo
- the connection information of the master connectionpConnectionInfoSub
- the connection information of the sub connection
Throwable
- communication error, security checks, invalid method, ...public boolean isOpen(ConnectionInfo pConnectionInfo)
isOpen
in interface IConnection
pConnectionInfo
- the connection information
public void close(ConnectionInfo pConnectionInfo) throws Throwable
close
in interface IConnection
pConnectionInfo
- the connection information
Throwable
- if the connection can not be establishedpublic void reopen(ConnectionInfo pConnectionInfo) throws Throwable
reopen
in interface IConnection
pConnectionInfo
- the connection information
Throwable
- if the connection can not be establishedpublic Object[] call(ConnectionInfo pConnectionInfo, String[] pObjectName, String[] pMethod, Object[][] pParams, ICallBackListener[] pCallBack) throws Throwable
call
in interface IConnection
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, ...public boolean isCalling()
isCalling
in interface IConnection
true
if a call is active, false
otherwisepublic ConnectionInfo[] setAndCheckAlive(ConnectionInfo pConnectionInfo, ConnectionInfo[] pSubConnections) throws Throwable
setAndCheckAlive
in interface IConnection
pConnectionInfo
- the connection informationpSubConnections
- the connection information of the sub connections, for the alive validation
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 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 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 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, ...
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |