Class ChainedIoHandler
java.lang.Object
org.apache.mina.core.service.IoHandlerAdapter
org.apache.mina.handler.chain.ChainedIoHandler
- All Implemented Interfaces:
IoHandler
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance which contains an emptyIoHandlerChain.ChainedIoHandler(IoHandlerChain chain) Creates a new instance which executes the specifiedIoHandlerChainon amessageReceivedevent. -
Method Summary
Modifier and TypeMethodDescriptiongetChain()voidmessageReceived(IoSession session, Object message) Handles the specifiedmessageReceivedevent with theIoHandlerCommandorIoHandlerChainyou specified in the constructor.Methods inherited from class IoHandlerAdapter
event, exceptionCaught, inputClosed, messageSent, sessionClosed, sessionCreated, sessionIdle, sessionOpened
-
Field Details
-
chain
-
-
Constructor Details
-
ChainedIoHandler
public ChainedIoHandler()Creates a new instance which contains an emptyIoHandlerChain. -
ChainedIoHandler
Creates a new instance which executes the specifiedIoHandlerChainon amessageReceivedevent.- Parameters:
chain- anIoHandlerChainto execute
-
-
Method Details
-
getChain
- Returns:
- the
IoHandlerCommandthis handler will use to handlemessageReceivedevents.
-
messageReceived
Handles the specifiedmessageReceivedevent with theIoHandlerCommandorIoHandlerChainyou specified in the constructor.- Specified by:
messageReceivedin interfaceIoHandler- Overrides:
messageReceivedin classIoHandlerAdapter- Parameters:
session- The session that is receiving a messagemessage- The received message- Throws:
Exception- If we get an exception while processing the received message
-