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,
java.lang.Object message)
Handles the specified messageReceived event with the
IoHandlerCommand or IoHandlerChain you specified
in the constructor. |
exceptionCaught, messageSent, sessionClosed, sessionCreated, sessionIdle, sessionOpened
public 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, java.lang.Object message) throws java.lang.Exception
IoHandlerCommand
or IoHandlerChain
you specified
in the constructor.messageReceived
in interface IoHandler
messageReceived
in class IoHandlerAdapter
java.lang.Exception
Copyright © 2004-2019 Apache MINA Project. All Rights Reserved.