|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface is required to communicate betweeen the lars system and any agent-like client (e.g. an Applet, a Java Application, etc.).
Method Summary | |
void |
connect()
Connects to the lars system. |
void |
disconnect()
Disconnects from the lars system (if already connected). |
Map |
getConnectionParameters()
Gets the connection parameters e.g. compression settings, secure settings, ... |
String |
getLarsHost()
Returns the host name of the lars system. |
boolean |
isConnected()
Checks if the object(messenger) is connected to the lars system or not. |
void |
setConnectionParameters(Map connectionParameters)
Sets the connection parameters e.g. compression settings, secure settings, ... |
void |
start()
Starts the thread in the CommmunicationTemplate. |
void |
waitForConnection()
Blocks the calling thread, if the current connection status is CommunicationTemplate.STATUS_NOT_CONNECTED . |
void |
waitForConnection(long timeout)
Blocks the calling thread as long as the following conditions are both true: timeout time in milliseconds is not expired current connection status is CommunicationTemplate.STATUS_NOT_CONNECTED .
|
Methods inherited from interface com.ls.lars.communication.ICommunication |
forwardMessage, forwardMessage, getAgentName, sendMessage, sendSynchronousRequest, sendSynchronousRequest |
Method Detail |
public void connect() throws ConnectionException
setConnectionParameters(java.util.Map)
before.ConnectionException
- if the connection failspublic boolean isConnected()
public void disconnect()
public String getLarsHost()
public void waitForConnection() throws ConnectionException
CommunicationTemplate.STATUS_NOT_CONNECTED
. The thread blocks as long as the connection status is
not changed in a Messenger#connect
or Messenger#connect
call (by another thread).ConnectionException
- if the connection setup failspublic void waitForConnection(long timeout) throws ConnectionException
CommunicationTemplate.STATUS_NOT_CONNECTED
.
timeout
- time in milliseconds; How long is the calling thread waits until an exception is thrownConnectionException
- if the connection status is CommunicationTemplate.STATUS_NOT_CONNECTED
even after the wait() or the connection setup failspublic void start()
public void setConnectionParameters(Map connectionParameters)
connectionParameters
- contains any Map with any parameterspublic Map getConnectionParameters()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |