|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.vamsas.client.picking.SocketManager
Concrete implementation of the IPickManager interface that uses sockets for message communication. An instance of this class attempts to run the central server for other clients; failing that, it attempts to connect to an existing server instead.
Constructor Summary | |
SocketManager()
Constructs a new PickManager. |
Method Summary | |
void |
registerMessageHandler(IMessageHandler handler)
Registers a message handler with the manager that allows the manager to perform a method callback on that object whenever a message is received. |
void |
sendMessage(Message message)
Sends a message to other clients. |
void |
shutdown()
Shutsdown the pick manager processes, terminating any connections to other clients. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SocketManager()
Method Detail |
public void registerMessageHandler(IMessageHandler handler)
registerMessageHandler
in interface IPickManager
handler
- the message handler to registerpublic void sendMessage(Message message)
sendMessage
in interface IPickManager
message
- the message to sendpublic void shutdown()
IPickManager
shutdown
in interface IPickManager
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |