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)`.
  Author:
    Apache MINA Project

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static MessageHandler<Object>` | `NOOP` A `MessageHandler` that does nothing.

  - ### Method Summary

    Methods
    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`.

- - ### Field Detail

    - #### 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.

  - ### Method Detail

    - #### 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-2012 Apache MINA Project. All Rights Reserved.