org.apache.mina.handler.demux
Interface MessageHandler<E>
public interface MessageHandler<E>
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)
.
- Version:
- $Rev: 678391 $, $Date: 2008-07-21 13:28:53 +0200 (lun, 21 jui 2008) $
- Author:
- The Apache MINA Project (dev@mina.apache.org)
Method Summary |
void |
handleMessage(IoSession session,
E message)
Invoked when the specific type of message is received from or sent to
the specified session . |
NOOP
static final MessageHandler<Object> NOOP
- A
MessageHandler
that does nothing. This is useful when
you want to ignore a message of a specific type silently.
handleMessage
void handleMessage(IoSession session,
E message)
throws Exception
- Invoked when the specific type of message is received from or sent to
the specified
session
.
- Parameters:
session
- the associated IoSession
message
- the message to decode. Its type is set by the implementation
- Throws:
Exception
- if there is an error during the message processing
Copyright © 2004-2008 Apache MINA Project. All Rights Reserved.