|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.rad.remote.AbstractConnection
public abstract class AbstractConnection
The AbstractConnection encapsulates the access to an
IConnection implementation.
It implements the connection
listener handling and an implementation of ConnectionInfo.
IConnection| Field Summary | |
|---|---|
protected ConnectionInfo |
coninf
the connection information. |
protected IConnection |
connection
the connection implementation. |
| Constructor Summary | |
|---|---|
protected |
AbstractConnection(IConnection pConnection)
Creates a new instance of AppliationConnection with an
IConnection implementation. |
| Method Summary | |
|---|---|
void |
addConnectionListener(IConnectionListener pListener)
Adds an IConnectionListener to the list of registered listeners. |
Object[] |
call(ICallBackListener[] pCallBack,
String[] pObjectName,
String[] pMethod,
Object[][] pParams)
Calls desired methods of server objects, through the connection. |
Object |
call(ICallBackListener pCallBack,
String pObjectName,
String pMethod)
The method will call a remote method from a remote object. |
Object |
call(ICallBackListener pCallBack,
String pObjectName,
String pMethod,
Object... pParams)
The method will call a remote method from a remote object. |
Object[] |
call(String[] pObjectName,
String[] pMethod)
Calls desired methods of server objects, through the connection. |
Object[] |
call(String[] pObjectName,
String[] pMethod,
Object[][] pParams)
Calls desired methods of server objects, through the connection. |
Object |
call(String pObjectName,
String pMethod)
The method will call a remote method from a remote object. |
Object |
call(String pObjectName,
String pMethod,
Object... pParams)
The method will call a remote method from a remote object. |
Object[] |
callAction(ICallBackListener[] pCallBack,
String[] pAction,
Object[][] pParams)
The method will call one or more remote actions. |
Object |
callAction(ICallBackListener pCallBack,
String pAction)
The method will call a remote action. |
Object |
callAction(ICallBackListener pCallBack,
String pAction,
Object... pParams)
The method will call a remote action. |
Object |
callAction(String pAction)
The method will call a remote action. |
Object[] |
callAction(String[] pAction)
The method will call one or more remote actions. |
Object[] |
callAction(String[] pAction,
Object[][] pParams)
The method will call one or more remote actions. |
Object |
callAction(String pAction,
Object... pParams)
The method will call a remote action. |
void |
close()
Close the connection. |
protected ChangedHashtable<String,Object> |
createConnectionProperties()
Gets the properties which will be sent to the server when opening a new connection. |
protected void |
finalize()
|
protected void |
fireCallError(Throwable pError)
Fires the callError methods to all registered connection listeners. |
String |
getApplicationName()
Gets the application name which will be used from the remote server to authenticate the connection. |
IConnection |
getConnection()
Returns the connection to the server. |
Object |
getConnectionId()
Gets the connection identifier for this connection. |
IConnectionListener[] |
getConnectionListener()
Gets all registered IConnectionListeners. |
String |
getLifeCycleName()
Gets the name of the server-side life-cycle object. |
protected String |
getPassword()
Gets the password which will be used from the remote server to authenticate the connection. |
Hashtable<String,Object> |
getProperties()
Gets a copy of the current properties. |
Object |
getProperty(String pName)
Gets a connection property. |
String |
getUserName()
Gets the user name which will be used from the remote server to authenticate the connection. |
boolean |
isOpen()
Checks if the connection is open. |
abstract void |
open()
Opens the connection. |
void |
removeConnectionListener(IConnectionListener pListener)
Removes an IConnectionListener from the list of registered listeners. |
void |
reopen()
Reopens the connection. |
void |
setApplicationName(String pApplicationName)
Sets the application name which will be used from the remote server to authenticate the connection, when the connection is not open. |
void |
setLifeCycleName(String pName)
Sets the name of the server-side life-cycle object. |
void |
setPassword(String pPassword)
Sets the password which will be used from the remote server to authenticate the connection, when the connection is not open. |
void |
setProperty(String pName,
Object pValue)
Sets a connection property. |
void |
setTimeout(int pMinutes)
Sets the timeout of the connection. |
void |
setUserName(String pUserName)
Sets the user name which will be used from the remote server to authenticate the connection, when the connection is not open. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected IConnection connection
protected ConnectionInfo coninf
| Constructor Detail |
|---|
protected AbstractConnection(IConnection pConnection)
AppliationConnection with an
IConnection implementation.
pConnection - the IConnection implementation| Method Detail |
|---|
public abstract void open()
throws Throwable
Throwable - if the connection can not be or is already opened
protected void finalize()
throws Throwable
finalize in class ObjectThrowablepublic void setLifeCycleName(String pName)
pName - the name of the life-cycle objectpublic String getLifeCycleName()
public void setApplicationName(String pApplicationName)
pApplicationName - the application namepublic String getApplicationName()
public void setUserName(String pUserName)
pUserName - the user namepublic String getUserName()
public void setPassword(String pPassword)
pPassword - the passwordprotected String getPassword()
public boolean isOpen()
true if the connection is open, otherwise false
public void close()
throws Throwable
Throwable - if it is not possible to close the connection
public void reopen()
throws Throwable
Throwable - if an error occurs while opening the connectionpublic IConnection getConnection()
public Object getConnectionId()
public Object[] call(ICallBackListener[] pCallBack,
String[] pObjectName,
String[] pMethod,
Object[][] pParams)
throws Throwable
pCallBack - callback listeners for asynchronous or null for synchronous callspObjectName - list of already mapped server object names/aliasespMethod - method names which should be calledpParams - parameters for the method calls
Throwable - communication error, security checks, invalid method, ...IConnection.call(ConnectionInfo, String[], String[], Object[][], ICallBackListener[])
public Object call(ICallBackListener pCallBack,
String pObjectName,
String pMethod,
Object... pParams)
throws Throwable
pCallBack - callback listener for asynchronous or null for synchronous callpObjectName - an already mapped server object name/aliaspMethod - method name which should be calledpParams - parameters for the method call
Throwable - communication error, security checks, invalid method, ...
public Object call(ICallBackListener pCallBack,
String pObjectName,
String pMethod)
throws Throwable
pCallBack - callback listener for asynchronous or null for synchronous callpObjectName - an already mapped server object name/aliaspMethod - method name which should be called
Throwable - communication error, security checks, invalid method, ...
public Object[] call(String[] pObjectName,
String[] pMethod,
Object[][] pParams)
throws Throwable
pObjectName - list of already mapped server object names/aliasespMethod - method names which should be calledpParams - parameters for the method calls
Throwable - communication error, security checks, invalid method, ...IConnection.call(ConnectionInfo, String[], String[], Object[][], ICallBackListener[])
public Object[] call(String[] pObjectName,
String[] pMethod)
throws Throwable
pObjectName - list of already mapped server object names/aliasespMethod - method names which should be called
Throwable - communication error, security checks, invalid method, ...IConnection.call(ConnectionInfo, String[], String[], Object[][], ICallBackListener[])
public Object call(String pObjectName,
String pMethod,
Object... pParams)
throws Throwable
pObjectName - an already mapped server object name/aliaspMethod - method name which should be calledpParams - parameters for the method call
Throwable - communication error, security checks, invalid method, ...IConnection.call(ConnectionInfo, String[], String[], Object[][], ICallBackListener[])
public Object call(String pObjectName,
String pMethod)
throws Throwable
pObjectName - an already mapped server object name/aliaspMethod - method name which should be called
Throwable - communication error, security checks, invalid method, ...IConnection.call(ConnectionInfo, String[], String[], Object[][], ICallBackListener[])
public Object callAction(String pAction)
throws Throwable
pAction - action which should be called
Throwable - communication error, security checks, invalid action, ...IConnection.call(ConnectionInfo, String[], String[], Object[][], ICallBackListener[])
public Object callAction(String pAction,
Object... pParams)
throws Throwable
pAction - action which should be calledpParams - parameters for the action call
Throwable - communication error, security checks, invalid method, ...IConnection.call(ConnectionInfo, String[], String[], Object[][], ICallBackListener[])
public Object[] callAction(String[] pAction,
Object[][] pParams)
throws Throwable
pAction - list of actions which should be calledpParams - parameters for the action calls
Throwable - communication error, security checks, invalid method, ...IConnection.call(ConnectionInfo, String[], String[], Object[][], ICallBackListener[])
public Object[] callAction(String[] pAction)
throws Throwable
pAction - list of actions which should be called
Throwable - communication error, security checks, invalid method, ...IConnection.call(ConnectionInfo, String[], String[], Object[][], ICallBackListener[])
public Object callAction(ICallBackListener pCallBack,
String pAction)
throws Throwable
pCallBack - callback listener for asynchronous or null for synchronous callpAction - action which should be called
Throwable - communication error, security checks, invalid method, ...IConnection.call(ConnectionInfo, String[], String[], Object[][], ICallBackListener[])
public Object callAction(ICallBackListener pCallBack,
String pAction,
Object... pParams)
throws Throwable
pCallBack - callback listener for asynchronous or null for synchronous callpAction - action which should be calledpParams - parameters for the action call
Throwable - communication error, security checks, invalid method, ...IConnection.call(ConnectionInfo, String[], String[], Object[][], ICallBackListener[])
public Object[] callAction(ICallBackListener[] pCallBack,
String[] pAction,
Object[][] pParams)
throws Throwable
pCallBack - callback listeners for asynchronous or null for synchronous callspAction - list of actions which should be calledpParams - parameters for the action calls
Throwable - communication error, security checks, invalid method, ...IConnection.call(ConnectionInfo, String[], String[], Object[][], ICallBackListener[])
public void setProperty(String pName,
Object pValue)
throws Throwable
pName - the property namepValue - the value of the property or null to delete the property
Throwable - communication error, security checks, invalid method, ...
public Object getProperty(String pName)
throws Throwable
pName - the property name
Throwable - communication error, security checks, invalid method, ...
public Hashtable<String,Object> getProperties()
throws Throwable
Throwable - communication error, security checks, invalid method, ...
public void setTimeout(int pMinutes)
throws Throwable
pMinutes - the timeout in minutes
Throwable - communication error, security checks, invalid method, ...protected ChangedHashtable<String,Object> createConnectionProperties()
public void addConnectionListener(IConnectionListener pListener)
IConnectionListener to the list of registered listeners.
pListener - the new connection listenerpublic void removeConnectionListener(IConnectionListener pListener)
IConnectionListener from the list of registered listeners.
pListener - the new connection listenerpublic IConnectionListener[] getConnectionListener()
IConnectionListeners.
IConnectionListeners or null if no listener is registeredprotected void fireCallError(Throwable pError)
callError methods to all registered connection listeners.
pError - the occured error
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||