Package com.iplanet.services.ldap
Class DSConfigMgr
- java.lang.Object
-
- com.iplanet.services.ldap.DSConfigMgr
-
- All Implemented Interfaces:
IDSConfigMgr
public class DSConfigMgr extends Object implements IDSConfigMgr
This object is the manager of all connection information. The server configuration file (serverconfig.xml) is loaded and cached in this object. This class exists as a singleton instance.
-
-
Field Summary
Fields Modifier and Type Field Description static String
AUTH_ID
static String
AUTH_PASSWD
static String
AUTH_TYPE
static String
AUTH_USER_ID
static String
BASE_DN
static String
CERTIFICATE
static int
DEF_INIT_CP_LEN
static int
DEF_MAX_CP_LEN
static String
DEFAULT
static String
HOST
static String
INVALID_SERVER_ID
static String
INVALID_USER_ID
static String
MAX_CONN_POOL
static String
MIN_CONN_POOL
static String
MISC_CONFIG
static String
NAME
static String
PORT
static String
ROOT
Constants used during parsing.static String
SCHEMA_BUG_PROPERTY
static String
SERVER
static String
SERVER_ID
static String
SERVER_ID_DOES_NOT_EXIST
static String
SERVERGROUP
static String
USER
static String
VAL_AUTH_ADMIN
static String
VAL_AUTH_ANONYMOUS
static String
VAL_AUTH_BASIC
static String
VAL_AUTH_PROXY
static String
VAL_AUTH_REBIND
static String
VAL_INACTIVE
static String
VAL_STANDARD
static String
VAL_STYPE_SIMPLE
static String
VAL_STYPE_SSL
static String
VALUE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DSConfigMgr
getDSConfigMgr()
Get the reference to the DSConfigMgr.com.iplanet.am.util.String
getHostName(String serverGroupID)
Returns the host names for this id.org.forgerock.opendj.ldap.ConnectionFactory
getNewAdminConnectionFactory()
org.forgerock.opendj.ldap.ConnectionFactory
getNewBasicConnectionFactory()
Get a new connection from this servergroup.org.forgerock.opendj.ldap.ConnectionFactory
getNewConnectionFactory(String serverGroupID, LDAPUser.Type authType)
Get a new connection from this servergroup.org.forgerock.opendj.ldap.ConnectionFactory
getNewProxyConnectionFactory()
Get a new proxy connection from this servergroup.ServerGroup
getServerGroup(String serverGroupID)
Get the ServerGroup object reference for this serverGroupID.ServerInstance
getServerInstance(LDAPUser.Type authType)
Get the instance from server group, which is defined as default.ServerInstance
getServerInstance(String serverGroupID, LDAPUser.Type authType)
Given the server group ID, this method returns the active and best available server instance.static DSConfigMgr
getStableDSConfigMgr()
Gets the stable DSConfigMgr instance after the system has been fully initialized.static void
initInstance(InputStream is, boolean isBootstrapComplete)
String
toString()
-
-
-
Field Detail
-
ROOT
public static final String ROOT
Constants used during parsing.- See Also:
- Constant Field Values
-
SERVERGROUP
public static final String SERVERGROUP
- See Also:
- Constant Field Values
-
SERVER
public static final String SERVER
- See Also:
- Constant Field Values
-
USER
public static final String USER
- See Also:
- Constant Field Values
-
SERVER_ID
public static final String SERVER_ID
- See Also:
- Constant Field Values
-
CERTIFICATE
public static final String CERTIFICATE
- See Also:
- Constant Field Values
-
AUTH_USER_ID
public static final String AUTH_USER_ID
- See Also:
- Constant Field Values
-
AUTH_ID
public static final String AUTH_ID
- See Also:
- Constant Field Values
-
AUTH_PASSWD
public static final String AUTH_PASSWD
- See Also:
- Constant Field Values
-
AUTH_TYPE
public static final String AUTH_TYPE
- See Also:
- Constant Field Values
-
BASE_DN
public static final String BASE_DN
- See Also:
- Constant Field Values
-
MISC_CONFIG
public static final String MISC_CONFIG
- See Also:
- Constant Field Values
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
HOST
public static final String HOST
- See Also:
- Constant Field Values
-
PORT
public static final String PORT
- See Also:
- Constant Field Values
-
MAX_CONN_POOL
public static final String MAX_CONN_POOL
- See Also:
- Constant Field Values
-
MIN_CONN_POOL
public static final String MIN_CONN_POOL
- See Also:
- Constant Field Values
-
VALUE
public static final String VALUE
- See Also:
- Constant Field Values
-
VAL_INACTIVE
public static final String VAL_INACTIVE
- See Also:
- Constant Field Values
-
VAL_AUTH_BASIC
public static final String VAL_AUTH_BASIC
- See Also:
- Constant Field Values
-
VAL_AUTH_PROXY
public static final String VAL_AUTH_PROXY
- See Also:
- Constant Field Values
-
VAL_AUTH_REBIND
public static final String VAL_AUTH_REBIND
- See Also:
- Constant Field Values
-
VAL_AUTH_ADMIN
public static final String VAL_AUTH_ADMIN
- See Also:
- Constant Field Values
-
VAL_AUTH_ANONYMOUS
public static final String VAL_AUTH_ANONYMOUS
- See Also:
- Constant Field Values
-
VAL_STYPE_SSL
public static final String VAL_STYPE_SSL
- See Also:
- Constant Field Values
-
VAL_STYPE_SIMPLE
public static final String VAL_STYPE_SIMPLE
- See Also:
- Constant Field Values
-
DEF_INIT_CP_LEN
public static final int DEF_INIT_CP_LEN
- See Also:
- Constant Field Values
-
DEF_MAX_CP_LEN
public static final int DEF_MAX_CP_LEN
- See Also:
- Constant Field Values
-
SCHEMA_BUG_PROPERTY
public static final String SCHEMA_BUG_PROPERTY
- See Also:
- Constant Field Values
-
VAL_STANDARD
public static final String VAL_STANDARD
- See Also:
- Constant Field Values
-
INVALID_SERVER_ID
public static final String INVALID_SERVER_ID
- See Also:
- Constant Field Values
-
SERVER_ID_DOES_NOT_EXIST
public static final String SERVER_ID_DOES_NOT_EXIST
- See Also:
- Constant Field Values
-
INVALID_USER_ID
public static final String INVALID_USER_ID
- See Also:
- Constant Field Values
-
DEFAULT
public static final String DEFAULT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getDSConfigMgr
public static DSConfigMgr getDSConfigMgr() throws LDAPServiceException
Get the reference to the DSConfigMgr.com.iplanet.am.util. The first one calling it creates the object, which gets stored in a local static variable.- Returns:
- DSConfigMgr The singleton instance.
- Throws:
LDAPServiceException
-
initInstance
public static void initInstance(InputStream is, boolean isBootstrapComplete) throws LDAPServiceException
- Throws:
LDAPServiceException
-
getStableDSConfigMgr
public static DSConfigMgr getStableDSConfigMgr() throws LDAPServiceException
Gets the stable DSConfigMgr instance after the system has been fully initialized. If bootstrap is still in progress then this method waits until the stable configuration is available. The method will time out after 30 seconds if no stable configuration is available. In this case, a warning will be logged and the current configuration returned.- Returns:
- the stable configuration.
- Throws:
LDAPServiceException
-
getServerGroup
public ServerGroup getServerGroup(String serverGroupID)
Get the ServerGroup object reference for this serverGroupID.- Specified by:
getServerGroup
in interfaceIDSConfigMgr
- Parameters:
serverGroupID
- The serverGroup ID for the ServerGroup to be retrieved.- Returns:
- ServerGroup The ServerGroup reference; null if no such Server group exists
-
getNewProxyConnectionFactory
public org.forgerock.opendj.ldap.ConnectionFactory getNewProxyConnectionFactory() throws LDAPServiceException
Get a new proxy connection from this servergroup. This method attempts to look for the "default" server configuration in the serverconfig.xml file.- Returns:
- LDAPConnection a new ldap connection.
- Throws:
LDAPServiceException
- If there is no user in the server group with this authentication type.
-
getNewAdminConnectionFactory
public org.forgerock.opendj.ldap.ConnectionFactory getNewAdminConnectionFactory() throws LDAPServiceException
- Throws:
LDAPServiceException
-
getNewBasicConnectionFactory
public org.forgerock.opendj.ldap.ConnectionFactory getNewBasicConnectionFactory() throws LDAPServiceException
Get a new connection from this servergroup. The rootdn might not have proxy rights. This method attempts to look for the "default" server configuration in the serverconfig.xml file.- Returns:
- LDAPConnection a new ldap connection.
- Throws:
LDAPServiceException
- If there is no user in the server group with this authentication type.
-
getNewConnectionFactory
public org.forgerock.opendj.ldap.ConnectionFactory getNewConnectionFactory(String serverGroupID, LDAPUser.Type authType) throws LDAPServiceException
Get a new connection from this servergroup.- Parameters:
serverGroupID
- The server group ID for which the connection is to be created.authType
- What kind of authentication do you want?- Returns:
- LDAPConnection a new ldap connection.
- Throws:
LDAPServiceException
- See Also:
LDAPUser.Type
-
getHostName
public String getHostName(String serverGroupID)
Description copied from interface:IDSConfigMgr
Returns the host names for this id.- Specified by:
getHostName
in interfaceIDSConfigMgr
- Parameters:
serverGroupID
- Server Group ID.- Returns:
- host names.
-
getServerInstance
public ServerInstance getServerInstance(String serverGroupID, LDAPUser.Type authType)
Given the server group ID, this method returns the active and best available server instance. The "best available" criteria is based on the priority. The priority is order in which the servers are listed in the configuration file. The first has the best priority and the last entry has the least priority. This method returns null if no qualified server instance is found or no such server group exists- Parameters:
serverGroupID
- The serverGroupID for which the server instance is fetched.authType
- The auth type is the privilege that the user in the configuration must have.- Returns:
- ServerInstance The server instance object that holds the server configuration information.
- See Also:
LDAPUser.Type
-
getServerInstance
public ServerInstance getServerInstance(LDAPUser.Type authType)
Get the instance from server group, which is defined as default.- Specified by:
getServerInstance
in interfaceIDSConfigMgr
- Parameters:
authType
- The auth type is the privilege that the user in the configuration must have.- Returns:
- ServerInstance The server instance object that holds the server configuration information.
- See Also:
LDAPUser.Type
-
-