Package 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
An
IoHandler which executes an IoHandlerChain
on a messageReceived event.-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance which contains an emptyIoHandlerChain.ChainedIoHandler(IoHandlerChain chain) Creates a new instance which executes the specifiedIoHandlerChainon a messageReceived event. -
Method Summary
Modifier and TypeMethodDescriptiongetChain()Returns theIoHandlerCommandthis handler will use to handle messageReceived events.voidmessageReceived(IoSession session, Object message) Handles the specified messageReceived event with theIoHandlerCommandorIoHandlerChainyou specified in the constructor.Methods inherited from class org.apache.mina.common.IoHandlerAdapter
exceptionCaught, messageSent, sessionClosed, sessionCreated, sessionIdle, sessionOpened
-
Constructor Details
-
ChainedIoHandler
public ChainedIoHandler()Creates a new instance which contains an emptyIoHandlerChain. -
ChainedIoHandler
Creates a new instance which executes the specifiedIoHandlerChainon a messageReceived event.- Parameters:
chain- anIoHandlerChainto execute
-
-
Method Details
-
getChain
Returns theIoHandlerCommandthis handler will use to handle messageReceived events. -
messageReceived
Handles the specified messageReceived event with theIoHandlerCommandorIoHandlerChainyou specified in the constructor.- Specified by:
messageReceivedin interfaceIoHandler- Overrides:
messageReceivedin classIoHandlerAdapter- Throws:
Exception
-