Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.apache.mina.common.IoHandlerAdapter
org.apache.mina.handler.chain.ChainedIoHandler
public class ChainedIoHandler
extends IoHandlerAdapter
IoHandler
which executes an IoHandlerChain
on a messageReceived event.
Constructor Summary | |
| |
|
Method Summary | |
IoHandlerChain |
|
void |
|
Methods inherited from class org.apache.mina.common.IoHandlerAdapter | |
exceptionCaught , messageReceived , messageSent , sessionClosed , sessionCreated , sessionIdle , sessionOpened |
public ChainedIoHandler()
Creates a new instance which contains an emptyIoHandlerChain
.
public ChainedIoHandler(IoHandlerChain chain)
Creates a new instance which executes the specifiedIoHandlerChain
on a messageReceived event.
- Parameters:
chain
- anIoHandlerChain
to execute
public IoHandlerChain getChain()
Returns theIoHandlerCommand
this handler will use to handle messageReceived events.
public void messageReceived(IoSession session, Object message) throws Exception
Handles the specified messageReceived event with theIoHandlerCommand
orIoHandlerChain
you specified in the constructor.
- Specified by:
- messageReceived in interface IoHandler
- Overrides:
- messageReceived in interface IoHandlerAdapter