public class ChainedIoHandler extends IoHandlerAdapter
IoHandler which executes an IoHandlerChain
on a messageReceived event.| Constructor and Description |
|---|
ChainedIoHandler()
Creates a new instance which contains an empty
IoHandlerChain. |
ChainedIoHandler(IoHandlerChain chain)
Creates a new instance which executes the specified
IoHandlerChain on a messageReceived event. |
| Modifier and Type | Method and Description |
|---|---|
IoHandlerChain |
getChain()
Returns the
IoHandlerCommand this handler will use to
handle messageReceived events. |
void |
messageReceived(IoSession session,
Object message)
Handles the specified messageReceived event with the
IoHandlerCommand or IoHandlerChain you specified
in the constructor. |
exceptionCaught, messageSent, sessionClosed, sessionCreated, sessionIdle, sessionOpenedpublic ChainedIoHandler()
IoHandlerChain.public ChainedIoHandler(IoHandlerChain chain)
IoHandlerChain on a messageReceived event.chain - an IoHandlerChain to executepublic IoHandlerChain getChain()
IoHandlerCommand this handler will use to
handle messageReceived events.public void messageReceived(IoSession session, Object message) throws Exception
IoHandlerCommand or IoHandlerChain you specified
in the constructor.messageReceived in interface IoHandlermessageReceived in class IoHandlerAdapterException