|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.mina.handler.multiton.SingleSessionIoHandlerAdapter
public class SingleSessionIoHandlerAdapter
Adapter class for implementors of the SingleSessionIoHandler
interface. The session to which the handler is assigned is accessible
through the getSession() method.
| Constructor Summary | |
|---|---|
SingleSessionIoHandlerAdapter(IoSession session)
Creates a new instance that is assigned to the passed in session. |
|
| Method Summary | |
|---|---|
void |
exceptionCaught(Throwable th)
Invoked when any exception is thrown by user IoHandler
implementation or by MINA. |
protected IoSession |
getSession()
Retrieves the session to which this handler is assigned. |
void |
messageReceived(Object message)
Invoked when protocol message is received. |
void |
messageSent(Object message)
Invoked when protocol message that user requested by IoSession.write(Object) is sent out actually. |
void |
sessionClosed()
Invoked when the connection is closed. |
void |
sessionCreated()
Invoked when the session is created. |
void |
sessionIdle(IdleStatus status)
Invoked when the connection is idle. |
void |
sessionOpened()
Invoked when the connection is opened. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SingleSessionIoHandlerAdapter(IoSession session)
session - the session to which the handler is assigned| Method Detail |
|---|
protected IoSession getSession()
public void exceptionCaught(Throwable th)
throws Exception
SingleSessionIoHandlerIoHandler
implementation or by MINA. If cause is instanceof
IOException, MINA will close the connection automatically.
exceptionCaught in interface SingleSessionIoHandlerth - the caught exception
ExceptionIoHandler.exceptionCaught(IoSession, Throwable)
public void messageReceived(Object message)
throws Exception
SingleSessionIoHandler
messageReceived in interface SingleSessionIoHandlermessage - the received message
ExceptionIoHandler.messageReceived(IoSession, Object)
public void messageSent(Object message)
throws Exception
SingleSessionIoHandlerIoSession.write(Object) is sent out actually.
messageSent in interface SingleSessionIoHandlermessage - the sent message
ExceptionIoHandler.messageSent(IoSession, Object)
public void sessionClosed()
throws Exception
SingleSessionIoHandler
sessionClosed in interface SingleSessionIoHandlerExceptionIoHandler.sessionClosed(IoSession)
public void sessionCreated()
throws Exception
SingleSessionIoHandler
sessionCreated in interface SingleSessionIoHandlerExceptionIoHandler.sessionCreated(IoSession)
public void sessionIdle(IdleStatus status)
throws Exception
SingleSessionIoHandlerIdleStatus. This
method is not invoked if the transport type is UDP.
sessionIdle in interface SingleSessionIoHandlerstatus - the type of idleness
ExceptionIoHandler.sessionIdle(IoSession, IdleStatus)
public void sessionOpened()
throws Exception
SingleSessionIoHandler
sessionOpened in interface SingleSessionIoHandlerExceptionIoHandler.sessionOpened(IoSession)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||