|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface SessionListener
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 SocketAddressat Sessionsuccessfully.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 |
|---|
void connectionEstablished(Session session)
void connectionClosed(Session session)
void messageReceived(Session session,
Message message)
void messageSent(Session session,
Message message)
void sessionIdle(Session session)
void exceptionCaught(Session session,
Throwable cause)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||