infoservice.mailsystem.central.server
Class ConnectionHandle

java.lang.Object
  extended by infoservice.mailsystem.central.server.ConnectionHandle

public class ConnectionHandle
extends java.lang.Object

This is the implementation for handling new connections. It does some general stuff and will look for a server implementation which will process the client request.


Constructor Summary
ConnectionHandle(java.net.Socket a_newConnection, IServerImplementationFactory a_serverImplementationFactory)
          Handles a new incoming connection from a client.
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionHandle

public ConnectionHandle(java.net.Socket a_newConnection,
                        IServerImplementationFactory a_serverImplementationFactory)
Handles a new incoming connection from a client. A new thread for handling the connection is created (also a cleanup thread is started to make sure, that the socket to the client is closed after connection handling has finished even if there occured a runtime exception).

Parameters:
a_newConnection - A socket connected to a client. If this value is null, nothing is is done.
a_serverImplementationFactory - The factory creating the server implementation for processing the client request. If this value is null or the factory doesn't return a valid server implementation, the connection will be closed immediately.