Package org.apache.mina.handler.multiton
Class SingleSessionIoHandlerDelegate
java.lang.Object
org.apache.mina.handler.multiton.SingleSessionIoHandlerDelegate
- All Implemented Interfaces:
IoHandler
An
IoHandler implementation which delegates all requests to
SingleSessionIoHandlers. A SingleSessionIoHandlerFactory
is used to create a new SingleSessionIoHandler for each newly
created session.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe key used to store theSingleSessionIoHandleras a session attribute. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance that uses the passed inSingleSessionIoHandlerFactoryto create newSingleSessionIoHandlers. -
Method Summary
Modifier and TypeMethodDescriptionvoidexceptionCaught(IoSession session, Throwable cause) Delegates the method call to theSingleSessionIoHandler.exceptionCaught(Throwable)method of the handler assigned to this session.voidmessageReceived(IoSession session, Object message) Delegates the method call to theSingleSessionIoHandler.messageReceived(Object)method of the handler assigned to this session.voidmessageSent(IoSession session, Object message) Delegates the method call to theSingleSessionIoHandler.messageSent(Object)method of the handler assigned to this session.voidsessionClosed(IoSession session) Delegates the method call to theSingleSessionIoHandler.sessionClosed()method of the handler assigned to this session.voidsessionCreated(IoSession session) Creates a new instance with the factory passed to the constructor of this class.voidsessionIdle(IoSession session, IdleStatus status) Delegates the method call to theSingleSessionIoHandler.sessionIdle(IdleStatus)method of the handler assigned to this session.voidsessionOpened(IoSession session) Delegates the method call to theSingleSessionIoHandler.sessionOpened()method of the handler assigned to this session.
-
Field Details
-
HANDLER
The key used to store theSingleSessionIoHandleras a session attribute.
-
-
Constructor Details
-
SingleSessionIoHandlerDelegate
Creates a new instance that uses the passed inSingleSessionIoHandlerFactoryto create newSingleSessionIoHandlers.- Parameters:
factory- the factory forSingleSessionIoHandlers
-
-
Method Details
-
sessionCreated
Creates a new instance with the factory passed to the constructor of this class. The created handler is stored as a session attribute namedHANDLER.- Specified by:
sessionCreatedin interfaceIoHandler- Throws:
Exception- See Also:
-
sessionOpened
Delegates the method call to theSingleSessionIoHandler.sessionOpened()method of the handler assigned to this session.- Specified by:
sessionOpenedin interfaceIoHandler- Throws:
Exception
-
sessionClosed
Delegates the method call to theSingleSessionIoHandler.sessionClosed()method of the handler assigned to this session.- Specified by:
sessionClosedin interfaceIoHandler- Throws:
Exception
-
sessionIdle
Delegates the method call to theSingleSessionIoHandler.sessionIdle(IdleStatus)method of the handler assigned to this session.- Specified by:
sessionIdlein interfaceIoHandler- Throws:
Exception
-
exceptionCaught
Delegates the method call to theSingleSessionIoHandler.exceptionCaught(Throwable)method of the handler assigned to this session.- Specified by:
exceptionCaughtin interfaceIoHandler- Throws:
Exception
-
messageReceived
Delegates the method call to theSingleSessionIoHandler.messageReceived(Object)method of the handler assigned to this session.- Specified by:
messageReceivedin interfaceIoHandler- Throws:
Exception
-
messageSent
Delegates the method call to theSingleSessionIoHandler.messageSent(Object)method of the handler assigned to this session.- Specified by:
messageSentin interfaceIoHandler- Throws:
Exception
-