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
AnIoHandler
which executes anIoHandlerChain
on 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 specifiedIoHandlerChain
on a messageReceived event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IoHandlerChain
getChain()
Returns theIoHandlerCommand
this handler will use to handle messageReceived events.void
messageReceived(IoSession session, java.lang.Object message)
Handles the specified messageReceived event with theIoHandlerCommand
orIoHandlerChain
you 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 specifiedIoHandlerChain
on a messageReceived event.- Parameters:
chain
- anIoHandlerChain
to execute
-
-
Method Detail
-
getChain
public IoHandlerChain getChain()
Returns theIoHandlerCommand
this 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 theIoHandlerCommand
orIoHandlerChain
you specified in the constructor.- Specified by:
messageReceived
in interfaceIoHandler
- Overrides:
messageReceived
in classIoHandlerAdapter
- Throws:
java.lang.Exception
-
-