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: 671827 $, $Date: 2008-06-26 10:49:48 +0200 (jeu, 26 jun 2008) $
- Author:
- The Apache MINA Project (dev@mina.apache.org)
IoHandlerChain
public IoHandlerChain()
- Creates a new, empty chain of
IoHandlerCommand
s.
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 requestmessage
- 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
Copyright © 2004-2008 Apache MINA Project. All Rights Reserved.