protected ServerSocketThread( CustomLogger logger,
				  InetAddress bindAddress,
				  int bindPort,
				  Environment<String,BasicType> bindSettings, 
				  ServerSocketThreadObserver observer 				  
				  ) 
	throws IOException,
	       GeneralSecurityException {	

	super();

	this.logger = logger;

	this.bindAddress = bindAddress;
	this.bindPort = bindPort;
	this.bindSettings = bindSettings;
	
	this.observer = observer;

	int backlog = DEFAULT_BACKLOG;
	if( bindSettings.get(Constants.CONFIG_SERVER_BACKLOG) != null )
	    backlog = bindSettings.get(Constants.CONFIG_SERVER_BACKLOG).getInt( DEFAULT_BACKLOG );

	boolean useSSL = false;
	if( bindSettings.get(Constants.CONFIG_SERVER_SSL) != null )
	    useSSL = bindSettings.get(Constants.CONFIG_SERVER_SSL).getBoolean();



	if( useSSL ) {

	    try {
		this.serverSocket = createSSLServerSocket( bindPort,
							   backlog,
							   bindAddress,
							   this.bindSettings 
							   );
	    } catch( NoSuchAlgorithmException e ) {

		throw new GeneralSecurityException( "Internal error: Cannot create SSLServerSocket. Failed to load encryption algorithm.", e );

	    }

	} else {
	    
	    this.serverSocket = new ServerSocket( bindPort,
						  backlog,
						  bindAddress 
						  );
	}

	this.uuid = UUID.randomUUID();

    }