org.jscience.net
Interface NetConnectionHandler

All Known Implementing Classes:
ChatServer, GameServer, JChat, JMessenger, JPlayerClient, SocketLogListener

public interface NetConnectionHandler

A NetConnectionHandler is used to handle incoming messages from a NetConnection. On the server side, there is typically one object for each connected client.

See Also:
NetConnection

Method Summary
 void connectionLost(NetConnection connection)
          called when a connection caused an IOException during reading or writing; the connection may not have been closed at this point.
 void handleMessage(java.lang.Object message, NetConnection connection)
          called when a message is received by the given NetConnection object
 

Method Detail

handleMessage

void handleMessage(java.lang.Object message,
                   NetConnection connection)
called when a message is received by the given NetConnection object

Parameters:
message - DOCUMENT ME!
connection - DOCUMENT ME!

connectionLost

void connectionLost(NetConnection connection)
called when a connection caused an IOException during reading or writing; the connection may not have been closed at this point.
Usually, it is a good idea to close the connection here explicitly.

Parameters:
connection - DOCUMENT ME!