Holger's
Java API

com.antelmann.net
Interface NetConnectionHandler

All Known Implementing Classes:
ChangeNotificationServer, ChatServer, JChat, JMessenger, LogNetPropagator, LogNetReceiver, NetConnectionAdapter, RemoteDatabaseChangeHandler, RemoteNetInterfaceProtocol, 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.

Author:
Holger Antelmann
See Also:
NetConnection, MessageDelegator

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(Object message, NetConnection connection)
          called when a message is received by the given NetConnection object
 

Method Detail

handleMessage

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


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.



(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads