Interface MessageHandler<M>
- Type Parameters:
M- The message type
public interface MessageHandler<M>
A handler interface that
DemuxingIoHandler forwards
messageReceived or messageSent events to. You have to
register your handler with the type of the message you want to get notified
using DemuxingIoHandler.addReceivedMessageHandler(Class, MessageHandler)
or DemuxingIoHandler.addSentMessageHandler(Class, MessageHandler).-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MessageHandler<Object> AMessageHandlerthat does nothing. -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleMessage(IoSession session, M message) Invoked when the specific type of message is received from or sent to the specifiedsession.
-
Field Details
-
NOOP
AMessageHandlerthat does nothing. This is useful when you want to ignore a message of a specific type silently.
-
-
Method Details