public class ChainedIoHandler extends IoHandlerAdapter
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() |
void |
messageReceived(IoSession session,
Object message)
Handles the specified
messageReceived event with the
IoHandlerCommand or IoHandlerChain you specified
in the constructor. |
event, exceptionCaught, inputClosed, 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, Object message) throws Exception
messageReceived
event with the
IoHandlerCommand
or IoHandlerChain
you specified
in the constructor.messageReceived
in interface IoHandler
messageReceived
in class IoHandlerAdapter
session
- The session that is receiving a messagemessage
- The received messageException
- If we get an exception while processing the received messageCopyright © 2004–2025 Apache MINA Project. All rights reserved.