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

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


connectionClosed

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


messageReceived

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


messageSent

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


sessionIdle

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


exceptionCaught

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



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