Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.apache.mina.handler.multiton.SingleSessionIoHandlerDelegate
IoHandler
implementation which delegates all requests to
SingleSessionIoHandler
s. A SingleSessionIoHandlerFactory
is used to create a new SingleSessionIoHandler
for each newly
created session.
Field Summary | |
static String |
|
Constructor Summary | |
|
Method Summary | |
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
public static final String HANDLER
The key used to store theSingleSessionIoHandler
as a session attribute.
public SingleSessionIoHandlerDelegate(SingleSessionIoHandlerFactory factory)
Creates a new instance that uses the passed inSingleSessionIoHandlerFactory
to create newSingleSessionIoHandler
s.
- Parameters:
factory
- the factory forSingleSessionIoHandler
s
public void exceptionCaught(IoSession session, Throwable cause) throws Exception
Delegates the method call to theSingleSessionIoHandler.exceptionCaught(Throwable)
method of the handler assigned to this session.
- Specified by:
- exceptionCaught in interface IoHandler
public void messageReceived(IoSession session, Object message) throws Exception
Delegates the method call to theSingleSessionIoHandler.messageReceived(Object)
method of the handler assigned to this session.
- Specified by:
- messageReceived in interface IoHandler
public void messageSent(IoSession session, Object message) throws Exception
Delegates the method call to theSingleSessionIoHandler.messageSent(Object)
method of the handler assigned to this session.
- Specified by:
- messageSent in interface IoHandler
public void sessionClosed(IoSession session) throws Exception
Delegates the method call to theSingleSessionIoHandler.sessionClosed()
method of the handler assigned to this session.
- Specified by:
- sessionClosed in interface IoHandler
public void sessionCreated(IoSession session) throws Exception
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:
- sessionCreated in interface IoHandler
- See Also:
IoHandler.sessionCreated(IoSession)
public void sessionIdle(IoSession session, IdleStatus status) throws Exception
Delegates the method call to theSingleSessionIoHandler.sessionIdle(IdleStatus)
method of the handler assigned to this session.
- Specified by:
- sessionIdle in interface IoHandler
public void sessionOpened(IoSession session) throws Exception
Delegates the method call to theSingleSessionIoHandler.sessionOpened()
method of the handler assigned to this session.
- Specified by:
- sessionOpened in interface IoHandler