public class SingleSessionIoHandlerDelegate extends java.lang.Object implements IoHandler
IoHandler implementation which delegates all requests to
SingleSessionIoHandlers. A SingleSessionIoHandlerFactory
is used to create a new SingleSessionIoHandler for each newly
created session.| 限定符和类型 | 字段和说明 |
|---|---|
static java.lang.String |
HANDLER
The key used to store the
SingleSessionIoHandler as a session
attribute. |
| 构造器和说明 |
|---|
SingleSessionIoHandlerDelegate(SingleSessionIoHandlerFactory factory)
Creates a new instance that uses the passed in
SingleSessionIoHandlerFactory to create new
SingleSessionIoHandlers. |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
exceptionCaught(IoSession session,
java.lang.Throwable cause)
Delegates the method call to the
SingleSessionIoHandler.exceptionCaught(Throwable) method of the
handler assigned to this session. |
void |
messageReceived(IoSession session,
java.lang.Object message)
Delegates the method call to the
SingleSessionIoHandler.messageReceived(Object) method of the
handler assigned to this session. |
void |
messageSent(IoSession session,
java.lang.Object message)
Delegates the method call to the
SingleSessionIoHandler.messageSent(Object) method of the handler
assigned to this session. |
void |
sessionClosed(IoSession session)
Delegates the method call to the
SingleSessionIoHandler.sessionClosed() method of the handler
assigned to this session. |
void |
sessionCreated(IoSession session)
Creates a new instance with the factory passed to the constructor of
this class.
|
void |
sessionIdle(IoSession session,
IdleStatus status)
Delegates the method call to the
SingleSessionIoHandler.sessionIdle(IdleStatus) method of the
handler assigned to this session. |
void |
sessionOpened(IoSession session)
Delegates the method call to the
SingleSessionIoHandler.sessionOpened() method of the handler
assigned to this session. |
public static final java.lang.String HANDLER
SingleSessionIoHandler as a session
attribute.public SingleSessionIoHandlerDelegate(SingleSessionIoHandlerFactory factory)
SingleSessionIoHandlerFactory to create new
SingleSessionIoHandlers.factory - the factory for SingleSessionIoHandlerspublic void sessionCreated(IoSession session) throws java.lang.Exception
HANDLER.sessionCreated 在接口中 IoHandlerjava.lang.ExceptionIoHandler.sessionCreated(org.apache.mina.common.IoSession)public void sessionOpened(IoSession session) throws java.lang.Exception
SingleSessionIoHandler.sessionOpened() method of the handler
assigned to this session.sessionOpened 在接口中 IoHandlerjava.lang.Exceptionpublic void sessionClosed(IoSession session) throws java.lang.Exception
SingleSessionIoHandler.sessionClosed() method of the handler
assigned to this session.sessionClosed 在接口中 IoHandlerjava.lang.Exceptionpublic void sessionIdle(IoSession session, IdleStatus status) throws java.lang.Exception
SingleSessionIoHandler.sessionIdle(IdleStatus) method of the
handler assigned to this session.sessionIdle 在接口中 IoHandlerjava.lang.Exceptionpublic void exceptionCaught(IoSession session, java.lang.Throwable cause) throws java.lang.Exception
SingleSessionIoHandler.exceptionCaught(Throwable) method of the
handler assigned to this session.exceptionCaught 在接口中 IoHandlerjava.lang.Exceptionpublic void messageReceived(IoSession session, java.lang.Object message) throws java.lang.Exception
SingleSessionIoHandler.messageReceived(Object) method of the
handler assigned to this session.messageReceived 在接口中 IoHandlerjava.lang.Exceptionpublic void messageSent(IoSession session, java.lang.Object message) throws java.lang.Exception
SingleSessionIoHandler.messageSent(Object) method of the handler
assigned to this session.messageSent 在接口中 IoHandlerjava.lang.Exception