org.pfsw.tools.beluga.ldap.server
Class LDAPServer

java.lang.Object
  extended by org.pf.util.ExceptionIgnorer
      extended by org.pf.net.RequestServer
          extended by org.pf.net.BinaryRequestServer
              extended by org.pfsw.tools.beluga.ldap.server.LDAPServer
All Implemented Interfaces:
Runnable, org.pf.bif.execution.IServiceStateChangeListener

public class LDAPServer
extends org.pf.net.BinaryRequestServer
implements org.pf.bif.execution.IServiceStateChangeListener

The LDAP server that is listening to a port for incoming requests. Then it launches a new thread for each request to be processed.

Version:
1.2
Author:
Manfred Duchrow

Field Summary
 
Fields inherited from interface org.pf.bif.execution.IServiceStateChangeListener
FIRST_CUSTOM_STATE, SERVICE_RESUMED, SERVICE_STARTED, SERVICE_STOPPED, SERVICE_SUSPENDED
 
Constructor Summary
LDAPServer()
          Initialize the new instance with default values.
LDAPServer(LDAPServerConfiguration configuration)
          Initialize the new instance with a port to listen to.
 
Method Summary
 int getNumberOfOpenConnections()
          Returns the current number of open connections from clients.
 void run()
          Starts running the server.
 void serviceStateChanged(org.pf.bif.execution.IService service, int event)
           
 void stop()
          Stops the server
 
Methods inherited from class org.pf.net.RequestServer
getConnectionIdleTimeout, getPort, setConnectionIdleTimeout
 
Methods inherited from class org.pf.util.ExceptionIgnorer
exceptionOccurred, getExceptionHandler, setExceptionHandler
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LDAPServer

public LDAPServer()
           throws IOException
Initialize the new instance with default values.

Throws:
IOException

LDAPServer

public LDAPServer(LDAPServerConfiguration configuration)
           throws IOException
Initialize the new instance with a port to listen to.

Parameters:
aPort - The port to listen on for new requests
Throws:
IOException
Method Detail

run

public void run()
Starts running the server.

Specified by:
run in interface Runnable
Overrides:
run in class org.pf.net.RequestServer

stop

public void stop()
Stops the server


getNumberOfOpenConnections

public int getNumberOfOpenConnections()
Returns the current number of open connections from clients.


serviceStateChanged

public void serviceStateChanged(org.pf.bif.execution.IService service,
                                int event)
Specified by:
serviceStateChanged in interface org.pf.bif.execution.IServiceStateChangeListener


Copyright © 2012 Manfred Duchrow Consulting & Software. All Rights Reserved.