Package org.apache.mina.handler.chain
Class IoHandlerChain
java.lang.Object
org.apache.mina.handler.chain.IoHandlerChain
- All Implemented Interfaces:
IoHandlerCommand
A chain of
IoHandlerCommand
s.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
Represents a name-command pair that anIoHandlerChain
contains.Nested classes/interfaces inherited from interface org.apache.mina.handler.chain.IoHandlerCommand
IoHandlerCommand.NextCommand
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
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
boolean
contains
(IoHandlerCommand command) void
execute
(IoHandlerCommand.NextCommand next, IoSession session, Object message) Execute a unit of processing work to be performed.getAll()
getNextCommand
(String name) toString()
-
Constructor Details
-
IoHandlerChain
public IoHandlerChain()Creates a new, empty chain ofIoHandlerCommand
s.
-
-
Method Details
-
getEntry
-
get
-
getNextCommand
-
addFirst
-
addLast
-
addBefore
-
addAfter
-
remove
-
clear
- 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 nextIoHandlerCommand
in aIoHandlerChain
containing thisIoHandlerCommand
by callingIoHandlerCommand.NextCommand.execute(IoSession,Object)
.- Specified by:
execute
in interfaceIoHandlerCommand
- Parameters:
next
- an indirect reference to the nextIoHandlerCommand
that provides a way to forward the request to the nextIoHandlerCommand
.session
- theIoSession
which is associated with this requestmessage
- the message object of this request- Throws:
Exception
- general purpose exception return to indicate abnormal termination
-
getAll
-
getAllReversed
-
contains
-
contains
-
contains
-
toString
-