|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This interface is required by all connection modules which connect from the client to the server for Amber. As the modules are dynamically instantiated the derived class must also have a default constructor. This class is also responsible for ensuring a reliable connection which reestablishes itself when the connection fails.
RComponent| Method Summary | |
void |
close()
Closes the connection to the remote server. |
void |
commLinkLost()
This function is called when the system has detected a communications fault to the server. |
void |
forwardPacket(Packet packet)
Called by the ReceiveThread and any internal functions when a packet is to be sent to its required destination. |
void |
init(BaseComponent parent,
Packet initialPacket,
int clientType,
java.lang.Object configuration)
This function initialises the connection module and establishes a link to the Amber server. |
void |
sendPacket(Packet packet)
Sends a packet to the remote server. |
void |
setSessionId(java.lang.String sessionId)
Sets the internal session identifier which is used when the connection is reestablished. |
| Method Detail |
public void init(BaseComponent parent,
Packet initialPacket,
int clientType,
java.lang.Object configuration)
throws java.io.IOException
parent - BaseComponent handle of the parent master object.initialPacket - to send to the server.clientType - int type of client object connecting.configuration - Object containing optional configuration information.
If this object is null the module will query the parent using getParameter
to get the required information.java.io.IOException - with any connection problems.public void setSessionId(java.lang.String sessionId)
sessionId - String containing the session identifier.public void sendPacket(Packet packet)
packet - Packet to send to the server.
public void forwardPacket(Packet packet)
throws AmberException
packet - Packet containing the information to send to the specified
component.AmberException - containing any errors.public void commLinkLost()
public void close()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||