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:
Michael Bayne
2001-05-29 03:27:59 +00:00
parent 6717f8d6e5
commit 33d93d3374
26 changed files with 947 additions and 124 deletions
@@ -0,0 +1,27 @@
//
// $Id: NetEventHandler.java,v 1.1 2001/05/29 03:27:59 mdb Exp $
package com.samskivert.cocktail.cher.server.net;
import ninja2.core.io_core.nbio.Selectable;
/**
* When a network event arrives on a particular <code>Selectable</code>,
* the connection manager calls the net event handler associated with that
* selectable to process the event. There are only a few handlers (and
* probably only ever will be): the one that accepts new connections, the
* one that deals with a connection while the client is authenticating and
* the one that processes messages from authenticated connections.
* Providing this interface prevents us from having to do a bunch of
* inefficient and ugly comparisons; instead we can simply call through an
* interface method to the proper code.
*/
public interface NetEventHandler
{
/**
* Called when a network event has occurred on the supplied source.
* The <code>events</code> parameter indicates which event or events
* have occurred.
*/
public void handleEvent (Selectable source, short events);
}