|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--advancedrelay.laygo.ProtocolStackServer
Encapsulates access to the LayGO RPC Server.
There is only one server connection, but methods are not declared static because of synchronization. There should be only one ProtocolStackServer object connected at any time.
All connect() methods automatically start heartbeating with the server. Module clients should not normally need to call heartbeat().
Constructor Summary | |
ProtocolStackServer()
|
Method Summary | |
void |
connect()
Connects to the server on the local machine |
void |
connect(int id)
Connects to the server by name |
void |
connect(java.lang.String address)
Connects to the server by IP address |
void |
disconnect()
Disconnects from the server. |
void |
heartbeat()
Sends a heartbeat message to the server. |
boolean |
isConnected()
Returns true if currently connected to the server, false otherwise. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ProtocolStackServer()
Method Detail |
public void connect() throws ProtocolStackException
ProtocolStackException
- The reason for failure.public void connect(int id) throws ProtocolStackException
id
- Id of server to connect to
ProtocolStackException
- The reason for failure.public void connect(java.lang.String address) throws ProtocolStackException
address
- IP address of server to connect to
ProtocolStackException
- The reason for failure.public void disconnect() throws ProtocolStackException
ProtocolStackException
- The reason for failure.public void heartbeat()
public boolean isConnected()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |