|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IoHandler
Handles all protocol events fired by MINA. There are 6 event handler methods, and they are all invoked by MINA automatically.
Please refer to
ReverseIoHandler
example.
IoHandlerAdapter| Method Summary | |
|---|---|
void |
exceptionCaught(IoSession session,
Throwable cause)
Invoked when any exception is thrown by user IoHandler
implementation or by MINA. |
void |
messageReceived(IoSession session,
Object message)
Invoked when protocol message is received. |
void |
messageSent(IoSession session,
Object message)
Invoked when protocol message that user requested by IoSession.write(Object) is sent out actually. |
void |
sessionClosed(IoSession session)
Invoked when the connection is closed. |
void |
sessionCreated(IoSession session)
Invoked when the session is created. |
void |
sessionIdle(IoSession session,
IdleStatus status)
Invoked when the connection is idle. |
void |
sessionOpened(IoSession session)
Invoked when the connection is opened. |
| Method Detail |
|---|
void sessionCreated(IoSession session)
throws Exception
Exception
void sessionOpened(IoSession session)
throws Exception
Exception
void sessionClosed(IoSession session)
throws Exception
Exception
void sessionIdle(IoSession session,
IdleStatus status)
throws Exception
IdleStatus. This
method is not invoked if the transport type is UDP.
Exception
void exceptionCaught(IoSession session,
Throwable cause)
throws Exception
IoHandler
implementation or by MINA. If cause is instanceof
IOException, MINA will close the connection automatically.
Exception
void messageReceived(IoSession session,
Object message)
throws Exception
Exception
void messageSent(IoSession session,
Object message)
throws Exception
IoSession.write(Object) is sent out actually.
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||