|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ClientConnectionHandler
Handles client connections to the given client type.
ClientConnectionHandlers are stored in the Darkstar data store, so must be either Serializable or a ManagedObject. If a handler is a ManagedObject, only a single copy of the handler will exist, and all messages will be forwarded to this object. If the handler is not a managed object, a separate copy of the handler will be created in each WonderlandSession that connects a client of the given type. It is recommended that handlers that expect a large number messages be Serializable.
| Method Summary | |
|---|---|
void |
clientConnected(WonderlandClientSender sender,
WonderlandClientID clientID,
java.util.Properties properties)
Handle when a new session connectes to this handler. |
void |
clientDisconnected(WonderlandClientSender sender,
WonderlandClientID clientID)
Handle when a session disconnects from this handler |
ConnectionType |
getConnectionType()
Get the type of connection this handler deals with |
void |
messageReceived(WonderlandClientSender sender,
WonderlandClientID clientID,
Message message)
Handle a message from a client |
void |
registered(WonderlandClientSender sender)
Called when the handler is registered with the CommsManager |
| Method Detail |
|---|
ConnectionType getConnectionType()
void registered(WonderlandClientSender sender)
sender - the WonderlandClientSender that can be used to
send to all clients of the given type
void clientConnected(WonderlandClientSender sender,
WonderlandClientID clientID,
java.util.Properties properties)
WonderlandSession.connect().
sender - the sender that can be used to send to clients
of this handlerclientID - the ID of the session that connectedproperties - the properties of the connection, or an
empty property object if the client didn't send any properties
void messageReceived(WonderlandClientSender sender,
WonderlandClientID clientID,
Message message)
sender - the sender that can be used to send to clients of
this handlerclientID - the ID of the session that connectedmessage - the message that was generated
void clientDisconnected(WonderlandClientSender sender,
WonderlandClientID clientID)
sender - the sender that can be used to send to clients
of this handlerclientID - the ID of the session that connected
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||