public interface MessageHandler<E>
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)
.Modifier and Type | Field and Description |
---|---|
static MessageHandler<java.lang.Object> |
NOOP
A
MessageHandler that does nothing. |
Modifier and Type | Method and Description |
---|---|
void |
handleMessage(IoSession session,
E message)
Invoked when the specific type of message is received from or sent to
the specified
session . |
static final MessageHandler<java.lang.Object> NOOP
MessageHandler
that does nothing. This is useful when
you want to ignore a message of a specific type silently.void handleMessage(IoSession session, E message) throws java.lang.Exception
session
.session
- the associated IoSession
message
- the message to decode. Its type is set by the implementationjava.lang.Exception
- if there is an error during the message processingCopyright © 2004-2019 Apache MINA Project. All Rights Reserved.