|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sibvisions.rad.remote.AbstractSerializedConnection
public abstract class AbstractSerializedConnection
This is the default IConnection implementation. It's independent
of the communication protocol.
| Field Summary | |
|---|---|
static String |
PROP_SERIALIZER
the property name for the serializer. |
| Constructor Summary | |
|---|---|
AbstractSerializedConnection(ISerializer pSerializer)
Creates a new instance of AbstractSerializedConnection. |
|
AbstractSerializedConnection(Properties pProperties)
Creates a new instance of AbstractSerializedConnection with
properties containing relevant information. |
|
| 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. |
protected static ISerializer |
createSerializer(String pClassName)
Creates the serializer from a given class name. |
protected void |
finalize()
|
abstract InputStream |
getInputStream(ConnectionInfo pConnectionInfo)
Gets the InputStream for reading the response from the
server. |
abstract OutputStream |
getOutputStream(ConnectionInfo pConnectionInfo)
Gets the OutputStream for submitting requests 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, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String PROP_SERIALIZER
| Constructor Detail |
|---|
public AbstractSerializedConnection(Properties pProperties)
throws ClassNotFoundException
AbstractSerializedConnection with
properties containing relevant information. The supported property
keys are:
pProperties - the properties for the connection
ClassNotFoundException - if the serializer is defined and could not be createdpublic AbstractSerializedConnection(ISerializer pSerializer)
AbstractSerializedConnection.
pSerializer - the serializer for the communication between client and server or
null to use the default serializerISerializer,
ByteSerializer| Method Detail |
|---|
public void open(ConnectionInfo pConnectionInfo)
throws Throwable
open in interface IConnectionpConnectionInfo - the connection information
Throwable - if the connection can not be established
public void openSub(ConnectionInfo pConnectionInfo,
ConnectionInfo pConnectionInfoSub)
throws Throwable
openSub in interface IConnectionpConnectionInfo - 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 IConnectionpConnectionInfo - the connection information
public void close(ConnectionInfo pConnectionInfo)
throws Throwable
close in interface IConnectionpConnectionInfo - the connection information
Throwable - if the connection can not be established
public void reopen(ConnectionInfo pConnectionInfo)
throws Throwable
reopen in interface IConnectionpConnectionInfo - the connection information
Throwable - if the connection can not be established
public Object[] call(ConnectionInfo pConnectionInfo,
String[] pObjectName,
String[] pMethod,
Object[][] pParams,
ICallBackListener[] pCallBack)
throws Throwable
call in interface IConnectionpConnectionInfo - 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 ConnectionInfo[] setAndCheckAlive(ConnectionInfo pConnectionInfo,
ConnectionInfo[] pSubConnections)
throws Throwable
setAndCheckAlive in interface IConnectionpConnectionInfo - 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 IConnectionpConnectionInfo - 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 property
public Object getProperty(ConnectionInfo pConnectionInfo,
String pName)
throws Throwable
getProperty in interface IConnectionpConnectionInfo - 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 IConnectionpConnectionInfo - 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 IConnectionpConnectionInfo - the connection informationpOldPassword - the old passwordpNewPassword - the new password
Throwable - communication error, security checks, invalid method, ...
public abstract OutputStream getOutputStream(ConnectionInfo pConnectionInfo)
throws Throwable
OutputStream for submitting requests to the
server.
pConnectionInfo - the connection information
Throwable - if it's not possible to get the output stream
public abstract InputStream getInputStream(ConnectionInfo pConnectionInfo)
throws Throwable
InputStream for reading the response from the
server.
pConnectionInfo - the connection information
Throwable - if it's not possible to get the the input stream
protected void finalize()
throws Throwable
finalize in class ObjectThrowable
protected static ISerializer createSerializer(String pClassName)
throws ClassNotFoundException
pClassName - the ISerializer implementation class
ClassNotFoundException - if the serializer could not be createdpublic boolean isCalling()
isCalling in interface IConnectiontrue if a call is active, false otherwise
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||