Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.mina.handler.chain
Class ChainedIoHandler

    java.lang.Object
      org.apache.mina.common.IoHandlerAdapter
          org.apache.mina.handler.chain.ChainedIoHandler

All Implemented Interfaces:
  IoHandler

    public class ChainedIoHandler

extends IoHandlerAdapter

An `IoHandler` which executes an `IoHandlerChain` on a `messageReceived` event.

Version:
  $Rev: 555855 $, $Date: 2007-07-13 12:19:00 +0900 (Fri, 13 Jul 2007) $
Author:
  The Apache Directory Project (mina-dev@directory.apache.org)

Constructor Summary
`ChainedIoHandler()` Creates a new instance which contains an empty `IoHandlerChain`.
`ChainedIoHandler(IoHandlerChain chain)` Creates a new instance which executes the specified `IoHandlerChain` on a `messageReceived` event.

Method Summary
`IoHandlerChain` | `getChain()` Returns the `IoHandlerCommand` this handler will use to handle `messageReceived` events.
`void` | `messageReceived(IoSession session, Object message)` Handles the specified `messageReceived` event with the `IoHandlerCommand` or `IoHandlerChain` you specified in the constructor.

Methods inherited from class org.apache.mina.common.IoHandlerAdapter
`exceptionCaught, messageSent, sessionClosed, sessionCreated, sessionIdle, sessionOpened`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ChainedIoHandler

    public ChainedIoHandler()

  Creates a new instance which contains an empty `IoHandlerChain`.

### ChainedIoHandler

    public ChainedIoHandler(IoHandlerChain chain)

  Creates a new instance which executes the specified `IoHandlerChain` on a `messageReceived` event.

  Parameters:
    `chain` - an `IoHandlerChain` to execute

Method Detail

### getChain

    public IoHandlerChain getChain()

  Returns the `IoHandlerCommand` this handler will use to handle `messageReceived` events.

### messageReceived

    public void messageReceived(IoSession session,
                                Object message)
                         throws Exception

  Handles the specified `messageReceived` event with the `IoHandlerCommand` or `IoHandlerChain` you specified in the constructor.

  Specified by:
    `messageReceived` in interface `IoHandler`
  Overrides:
    `messageReceived` in class `IoHandlerAdapter`
  Throws:
    `Exception`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2008 Apache MINA Project. All Rights Reserved.