Package org.apache.mina.handler.chain
Class IoHandlerChain
java.lang.Object
org.apache.mina.handler.chain.IoHandlerChain
- All Implemented Interfaces:
IoHandlerCommand
A chain of
IoHandlerCommands.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassRepresents a name-command pair that anIoHandlerChaincontains.Nested classes/interfaces inherited from interface org.apache.mina.handler.chain.IoHandlerCommand
IoHandlerCommand.NextCommand -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAfter(String baseName, String name, IoHandlerCommand command) voidaddBefore(String baseName, String name, IoHandlerCommand command) voidaddFirst(String name, IoHandlerCommand command) voidaddLast(String name, IoHandlerCommand command) voidclear()booleancontains(Class<? extends IoHandlerCommand> commandType) booleanbooleancontains(IoHandlerCommand command) voidexecute(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 ofIoHandlerCommands.
-
-
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:IoHandlerCommandExecute a unit of processing work to be performed. This
IoHandlerCommandmay either complete the required processing and just return to stop the processing, or delegate remaining processing to the nextIoHandlerCommandin aIoHandlerChaincontaining thisIoHandlerCommandby callingIoHandlerCommand.NextCommand.execute(IoSession,Object).- Specified by:
executein interfaceIoHandlerCommand- Parameters:
next- an indirect reference to the nextIoHandlerCommandthat provides a way to forward the request to the nextIoHandlerCommand.session- theIoSessionwhich 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
-