net.gleamynode.netty2
Interface SessionListener


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:

Version:
$Rev: 4 $, $Date: 2005-04-18 12:04:09 +0900 $
Author:
Trustin Lee (http://gleamynode.net/dev/)

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

connectionEstablished

void connectionEstablished(Session session)
Invoked when the connection is established.


connectionClosed

void connectionClosed(Session session)
Invoked when the connection is closed.


messageReceived

void messageReceived(Session session,
                     Message message)
Invoked when a message has arrived.


messageSent

void messageSent(Session session,
                 Message message)
Invoked when a message has been sent.


sessionIdle

void sessionIdle(Session session)
Invoked when the session is idle for predefined amount of time.


exceptionCaught

void exceptionCaught(Session session,
                     Throwable cause)
Invoked when an exception is caught while communicating.



Copyright © 2004-2010 Trustin Lee. All Rights Reserved.