com.echomine.net
Interface ConnectionListener

All Superinterfaces:
java.util.EventListener

public interface ConnectionListener
extends java.util.EventListener

listener that should be implemented to listen for any connection events


Method Summary
 void connectionClosed(ConnectionEvent e)
          The event is fired when the connection is closed normally or abnormally.
 void connectionEstablished(ConnectionEvent e)
          This event is fired when a connection is fully established.
 void connectionStarting(ConnectionEvent e)
          This event is fired when a connection is just starting.
 

Method Detail

connectionStarting

void connectionStarting(ConnectionEvent e)
                        throws ConnectionVetoException
This event is fired when a connection is just starting. This may take place before or after a connection is physically connected. However, it is guaranteed that any handling of connection data will not occur until AFTER this event is entirely processed. The listener implementation can also throw an exception to indicate that the connection is vetoed. A vetoed connection will close normally but will contain a vetoed status (not closed or errored status).

Throws:
ConnectionVetoException

connectionEstablished

void connectionEstablished(ConnectionEvent e)
This event is fired when a connection is fully established. If a connection is not established due to some sort of error (ie. unknown host name or just unable to connect), then this event will NOT be fired.


connectionClosed

void connectionClosed(ConnectionEvent e)

The event is fired when the connection is closed normally or abnormally.

The status code will let you know how the connection is closed. If the connection is closed abnormally, a error message will go along with it



Copyright © 2001-2005 Echomine. All Rights Reserved.