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 IoHandlerChain

    java.lang.Object
      org.apache.mina.handler.chain.IoHandlerChain

All Implemented Interfaces:
  IoHandlerCommand

    public class IoHandlerChain

extends Object
implements IoHandlerCommand

A chain of `IoHandlerCommand`s.

Version:
  $Rev: 555855 $, $Date: 2007-07-13 05:19:00 +0200 (Fri, 13 Jul 2007) $
Author:
  Apache Directory Project

Nested Class Summary
`class` | `IoHandlerChain.Entry` Represents a name-command pair that an `IoHandlerChain` contains.

Nested classes/interfaces inherited from interface org.apache.mina.handler.chain.IoHandlerCommand
`IoHandlerCommand.NextCommand`

Constructor Summary
`IoHandlerChain()` Creates a new, empty chain of `IoHandlerCommand`s.

Method Summary
`void` | `addAfter(String baseName, String name, IoHandlerCommand command)`
`void` | `addBefore(String baseName, String name, IoHandlerCommand command)`
`void` | `addFirst(String name, IoHandlerCommand command)`
`void` | `addLast(String name, IoHandlerCommand command)`
`void` | `clear()`
`boolean` | `contains(Class<? extends IoHandlerCommand> commandType)`
`boolean` | `contains(IoHandlerCommand command)`
`boolean` | `contains(String name)`
`void` | `execute(IoHandlerCommand.NextCommand next, IoSession session, Object message)` Execute a unit of processing work to be performed.
`IoHandlerCommand` | `get(String name)`
`List<IoHandlerChain.Entry>` | `getAll()`
`List<IoHandlerChain.Entry>` | `getAllReversed()`
`IoHandlerChain.Entry` | `getEntry(String name)`
`IoHandlerCommand.NextCommand` | `getNextCommand(String name)`
`IoHandlerCommand` | `remove(String name)`
`String` | `toString()`

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

Constructor Detail

### IoHandlerChain

    public IoHandlerChain()

  Creates a new, empty chain of `IoHandlerCommand`s.

Method Detail

### getEntry

    public IoHandlerChain.Entry getEntry(String name)

### get

    public IoHandlerCommand get(String name)

### getNextCommand

    public IoHandlerCommand.NextCommand getNextCommand(String name)

### addFirst

    public void addFirst(String name,
                         IoHandlerCommand command)

### addLast

    public void addLast(String name,
                        IoHandlerCommand command)

### addBefore

    public void addBefore(String baseName,
                          String name,
                          IoHandlerCommand command)

### addAfter

    public void addAfter(String baseName,
                         String name,
                         IoHandlerCommand command)

### remove

    public IoHandlerCommand remove(String name)

### clear

    public void clear()
               throws Exception

  Throws:
    `Exception`

### execute

    public void execute(IoHandlerCommand.NextCommand next,
                        IoSession session,
                        Object message)
                 throws Exception

  Description copied from interface: `IoHandlerCommand`

  Execute a unit of processing work to be performed. This `IoHandlerCommand` may either complete the required processing and just return to stop the processing, or delegate remaining processing to the next `IoHandlerCommand` in a `IoHandlerChain` containing this `IoHandlerCommand` by calling `IoHandlerCommand.NextCommand.execute(IoSession,Object)`.

  Specified by:
    `execute` in interface `IoHandlerCommand`
  Parameters:
    `next` - an indirect reference to the next `IoHandlerCommand` that provides a way to forward the request to the next `IoHandlerCommand`.
    `session` - the `IoSession` which is associated with this request
    `message` - the message object of this request
  Throws:
    `Exception` - general purpose exception return to indicate abnormal termination

### getAll

    public List<IoHandlerChain.Entry> getAll()

### getAllReversed

    public List<IoHandlerChain.Entry> getAllReversed()

### contains

    public boolean contains(String name)

### contains

    public boolean contains(IoHandlerCommand command)

### contains

    public boolean contains(Class<? extends IoHandlerCommand> commandType)

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

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.