public interface MessageHandler
Connection.
An implementor of this interface is associated with each Connection
object, to handle both incoming messages and disconnection events.
Normally, a Connection's MessageHandler is produced by a MessageHandlerFactory when the connection is established. The factory is
held by the NetworkManager for this purpose.| Modifier and Type | Method and Description |
|---|---|
void |
connectionDied(Connection connection,
Throwable reason)
Cope with connection death.
|
void |
processMessage(Connection connection,
Object message)
Process an incoming message from a connection.
|
void connectionDied(Connection connection, Throwable reason)
connection - The connection that has just died.reason - A possible indication why the connection went away.void processMessage(Connection connection, Object message)
connection - The connection upon which the message arrived.message - The incoming message.Copyright © 2017. All rights reserved.