Har! More progress mateys.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
//
|
||||
// $Id: ConnectionObserver.java,v 1.1 2001/05/29 03:27:59 mdb Exp $
|
||||
|
||||
package com.samskivert.cocktail.cher.server.net;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* A connection observer can be registered with the connection manager to
|
||||
* hear about new connections and to be notified when connections fail or
|
||||
* are closed. Only fully authenticated connections will be passed on to
|
||||
* the connection observer. Connections that fail to authenticate will be
|
||||
* handled entirely within the confines of the connection manager.
|
||||
*
|
||||
* @see ConnectionManager
|
||||
* @see Connection
|
||||
*/
|
||||
public interface ConnectionObserver
|
||||
{
|
||||
/**
|
||||
* Called when a new connection is established with the connection
|
||||
* manager.
|
||||
*
|
||||
* @param conn The newly established connection.
|
||||
*/
|
||||
public void connectionEstablished (Connection conn);
|
||||
|
||||
/**
|
||||
* Called if a connection fails for any reason. If a connection fails,
|
||||
* <code>connectionClosed</code> will not be called. This call to
|
||||
* <code>connectionFailued</code> is the last the observers will hear
|
||||
* about it.
|
||||
*
|
||||
* @param conn The connection in that failed.
|
||||
* @param fault The exception associated with the failure.
|
||||
*/
|
||||
public void connectionFailed (Connection conn, IOException fault);
|
||||
|
||||
/**
|
||||
* Called when a connection has been closed in an orderly manner.
|
||||
*
|
||||
* @param conn The recently closed connection.
|
||||
*/
|
||||
public void connectionClosed (Connection conn);
|
||||
}
|
||||
Reference in New Issue
Block a user