|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MessageHandler
This interface is used by client program to define the communication interface that ConnectionHandler uses to pass messages received from server to Lobby and to GameControllers started from the lobby. Messages are passed through this interface according to implementing objects sessionID. If you wish to know more about the messaging protocol used, please see protocol.xsd schema file in protocols directory for further details and additional comments for different components in the message.
Method Summary | |
---|---|
ConnectionHandler |
getConnectionHandler()
Returns the ConnectionHandler used by implementing class. |
long |
getID()
Returns the sessionID of this MessageHandler. |
void |
handleRequest(Request req)
Handles a Request sent by the server. |
void |
handleResponse(Response rsp)
Handles a Response sent by the server. |
void |
handleStateUpdate(StateUpdate stateUp)
Handles StateUpdates sent by server. |
void |
setConnectionHandler(ConnectionHandler connection)
Sets the ConnectionHandler which passes messages to the implementing class trough this interfaces methods. |
void |
setID(long id)
Sets a sessionID for this MessageHandler. |
Method Detail |
---|
void handleResponse(Response rsp)
rsp
- Response sent by server. Response is an object generated from
XML message using JAXB.void handleRequest(Request req)
req
- Request sent by server. Request is an object generated from
XML message using JAXB.void handleStateUpdate(StateUpdate stateUp)
stateUp
- StateUpdate sent by server. StateUpdate is an object generated from
XML message using JAXB.void setConnectionHandler(ConnectionHandler connection)
connection
- ConnectionHandler to be used.ConnectionHandler getConnectionHandler()
long getID()
void setID(long id)
id
- Semi-Unique sessionID.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |