|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An event listener that handles session events dispatched from
EventDispatcher
. Implement the protocol workflow by implementing
this interface.
There are 6 session events available:
connectionEstablished
: Connected to
the SocketAddress
at Session
successfully.connectionClosed
: The connection is
closed. This event always takes place after IOException
(except ConnectException
) is thrown because the connection
is automatically closed.messageReceived
: The message is read
from the incoming channel data.messageSent
: The message is sent to
the socket channel.sessionIdle
: The session is idle for
Session
.idleTime
secondsexceptionCaught
: An exception has been
thrown while doing I/O or processing business logic in
SessionListener
.
Method Summary | |
void |
connectionClosed(Session session)
Invoked when the connection is closed. |
void |
connectionEstablished(Session session)
Invoked when the connection is established. |
void |
exceptionCaught(Session session,
Throwable cause)
Invoked when an exception is caught while communicating. |
void |
messageReceived(Session session,
Message message)
Invoked when a message has arrived. |
void |
messageSent(Session session,
Message message)
Invoked when a message has been sent. |
void |
sessionIdle(Session session)
Invoked when the session is idle for predefined amount of time. |
Method Detail |
public void connectionEstablished(Session session)
public void connectionClosed(Session session)
public void messageReceived(Session session, Message message)
public void messageSent(Session session, Message message)
public void sessionIdle(Session session)
public void exceptionCaught(Session session, Throwable cause)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |