public interface ProtocolHandler
Please refer to
ReverseProtocolHandler
example.
ProtocolHandlerAdapter
Modifier and Type | Method and Description |
---|---|
void |
exceptionCaught(ProtocolSession session,
java.lang.Throwable cause)
Invoked when any exception is thrown by user
ProtocolHandler
implementation or by MINA. |
void |
messageReceived(ProtocolSession session,
java.lang.Object message)
Invoked when protocol message is received.
|
void |
messageSent(ProtocolSession session,
java.lang.Object message)
Invoked when protocol message that user requested by
ProtocolSession.write(Object) is sent out actually. |
void |
sessionClosed(ProtocolSession session)
Invoked when the connection is closed.
|
void |
sessionCreated(ProtocolSession session)
Invoked when the session is created.
|
void |
sessionIdle(ProtocolSession session,
IdleStatus status)
Invoked when the connection is idle.
|
void |
sessionOpened(ProtocolSession session)
Invoked when the connection is opened.
|
void sessionCreated(ProtocolSession session) throws java.lang.Exception
java.lang.Exception
void sessionOpened(ProtocolSession session) throws java.lang.Exception
java.lang.Exception
void sessionClosed(ProtocolSession session) throws java.lang.Exception
java.lang.Exception
void sessionIdle(ProtocolSession session, IdleStatus status) throws java.lang.Exception
IdleStatus
. This
method is not invoked if the transport type is UDP.java.lang.Exception
void exceptionCaught(ProtocolSession session, java.lang.Throwable cause) throws java.lang.Exception
ProtocolHandler
implementation or by MINA. If cause
is instanceof
IOException
, MINA will close the connection automatically.java.lang.Exception
void messageReceived(ProtocolSession session, java.lang.Object message) throws java.lang.Exception
java.lang.Exception
void messageSent(ProtocolSession session, java.lang.Object message) throws java.lang.Exception
ProtocolSession.write(Object)
is sent out actually.java.lang.Exception