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
public class ChainedIoHandler extends IoHandlerAdapter
AnIoHandlerwhich executes anIoHandlerChainon a messageReceived event.
-
-
Constructor Summary
Constructors Constructor Description ChainedIoHandler()Creates a new instance which contains an emptyIoHandlerChain.ChainedIoHandler(IoHandlerChain chain)Creates a new instance which executes the specifiedIoHandlerChainon a messageReceived event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IoHandlerChaingetChain()Returns theIoHandlerCommandthis handler will use to handle messageReceived events.voidmessageReceived(IoSession session, java.lang.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 Detail
-
ChainedIoHandler
public ChainedIoHandler()
Creates a new instance which contains an emptyIoHandlerChain.
-
ChainedIoHandler
public ChainedIoHandler(IoHandlerChain chain)
Creates a new instance which executes the specifiedIoHandlerChainon a messageReceived event.- Parameters:
chain- anIoHandlerChainto execute
-
-
Method Detail
-
getChain
public IoHandlerChain getChain()
Returns theIoHandlerCommandthis handler will use to handle messageReceived events.
-
messageReceived
public void messageReceived(IoSession session, java.lang.Object message) throws java.lang.Exception
Handles the specified messageReceived event with theIoHandlerCommandorIoHandlerChainyou specified in the constructor.- Specified by:
messageReceivedin interfaceIoHandler- Overrides:
messageReceivedin classIoHandlerAdapter- Throws:
java.lang.Exception
-
-