org.pfsw.tools.beluga
Class Beluga

java.lang.Object
  extended by org.pfsw.tools.beluga.Beluga

public class Beluga
extends Object

The LDAP server main class.

Version:
1.3.1
Author:
Manfred Duchrow

Field Summary
static String PARAM_ADMIN_PORT
           
static String PARAM_DIRECTORY_DEFINITION
           
static String PARAM_INTERCEPTORS
           
static String PARAM_LDAP_PORT
           
static String PARAM_SERVER_DEFINITION
           
static String PROG_VERSION
           
 
Constructor Summary
Beluga()
          Initialize the new instance with default values.
 
Method Summary
 void execute(org.pf.text.CommandLineArguments args, boolean runsEmbedded)
          Start the LDAP server and - if rundEmbedded is false - its associated admin server.
static Beluga launch()
          Launches an LDAP server instance listening to the default port 389.
static Beluga launch(int dirPort)
          Launches an LDAP server instance listening to the given port.
static Beluga launch(String dirDefinition)
          Launches an LDAP server instance listening to the given default port 389 and containing the data specified by the definition file given in by parameter dirDefinition.
static Beluga launch(String dirDefinition, int dirPort)
          Launches an LDAP server instance listening to the given port and containing the data specified by the definition file given in by parameter dirDefinition.
static void main(String[] args)
           
 void shutdown()
          Shutdown all servers
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROG_VERSION

public static final String PROG_VERSION
See Also:
Constant Field Values

PARAM_SERVER_DEFINITION

public static final String PARAM_SERVER_DEFINITION
See Also:
Constant Field Values

PARAM_DIRECTORY_DEFINITION

public static final String PARAM_DIRECTORY_DEFINITION
See Also:
Constant Field Values

PARAM_INTERCEPTORS

public static final String PARAM_INTERCEPTORS
See Also:
Constant Field Values

PARAM_LDAP_PORT

public static final String PARAM_LDAP_PORT
See Also:
Constant Field Values

PARAM_ADMIN_PORT

public static final String PARAM_ADMIN_PORT
See Also:
Constant Field Values
Constructor Detail

Beluga

public Beluga()
Initialize the new instance with default values.

Method Detail

main

public static void main(String[] args)

launch

public static Beluga launch()
Launches an LDAP server instance listening to the default port 389. and containing the data specified by the default definition file "directory.xml".

This method is supposed to be used by applications that want to use the LDAP server embedded.


launch

public static Beluga launch(int dirPort)
Launches an LDAP server instance listening to the given port. and containing the data specified by the default definition file "directory.xml".

This method is supposed to be used by applications that want to use the LDAP server embedded.

Parameters:
dirPort - The port of the LDAP server

launch

public static Beluga launch(String dirDefinition)
Launches an LDAP server instance listening to the given default port 389 and containing the data specified by the definition file given in by parameter dirDefinition.

This method is supposed to be used by applications that want to use the LDAP server embedded.

Parameters:
dirDefinition - The path of the XML file that contains the definition of files to be loaded into the LDAP server.

launch

public static Beluga launch(String dirDefinition,
                            int dirPort)
Launches an LDAP server instance listening to the given port and containing the data specified by the definition file given in by parameter dirDefinition.

This method is supposed to be used by applications that want to use the LDAP server embedded.

Parameters:
dirDefinition - The path of the XML file that contains the definition of files to be loaded into the LDAP server.
dirPort - The port of the LDAP server
Throws:
IllegalArgumentException - If the given port is out of allowed port range (1-65535)

execute

public void execute(org.pf.text.CommandLineArguments args,
                    boolean runsEmbedded)
Start the LDAP server and - if rundEmbedded is false - its associated admin server. The ports and files they are based on can be specified via the command line arguments. Parameter runsEmbedded must be set to true if the LDAP server is embedded in another application and therefore the current thread must not be blocked by it. If runsEmbedded is set to false the current thread is looping until an external signal shuts down the server.


shutdown

public void shutdown()
Shutdown all servers



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