public final class DirectoryServer extends Object implements AlertGenerator
Modifier and Type | Class and Description |
---|---|
static class |
DirectoryServer.DirectoryServerVersionHandler
Class that prints the version of OpenDJ server to System.out.
|
static class |
DirectoryServer.InitializationBuilder
Initialize the client DirectoryServer singleton by using a fluent interface.
|
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_TIMEOUT
The default timeout used to start the server in detach mode.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
allowNewPersistentSearch()
Indicates whether a new persistent search is allowed.
|
static void |
bootstrapClient()
Bootstraps the appropriate Directory Server structures that may be needed by both server and client-side tools.
|
static void |
checkCanEnqueueRequest(Operation operation,
boolean isAllowedInLockDownMode)
Runs all the necessary checks prior to adding an operation to the work queue.
|
static void |
connectionClosed(ClientConnection clientConnection)
Indicates that the specified client connection has been closed.
|
static void |
deregisterAccountStatusNotificationHandler(Dn handlerDN)
Deregisters the specified account status notification handler with the Directory Server.
|
static void |
deregisterAlertGenerator(AlertGenerator alertGenerator)
Deregisters the provided alert generator with the Directory Server.
|
static void |
deregisterAlertHandler(AlertHandler<?> alertHandler)
Deregisters the provided alert handler with the Directory Server.
|
static void |
deregisterAuthenticationPolicy(Dn configEntryDN)
Deregisters the provided authentication policy with the Directory Server.
|
static void |
deregisterBackupTaskListener(BackupTaskListener listener)
Deregisters the provided backup task listener with the Directory Server.
|
static void |
deregisterCertificateMapper(Dn mapperDN)
Deregisters the specified certificate mapper with the Directory Server.
|
static void |
deregisterConnectionHandler(ConnectionHandler<?> handler)
Deregisters the provided connection handler with the Directory Server.
|
static void |
deregisterExportTaskListener(ExportTaskListener listener)
Deregisters the provided LDIF export task listener with the Directory Server.
|
static void |
deregisterIdentityMapper(Dn configEntryDN)
Deregisters the provided identity mapper for use with the Directory Server.
|
static void |
deregisterImportTaskListener(ImportTaskListener listener)
Deregisters the provided LDIF import task listener with the Directory Server.
|
static void |
deregisterInitializationCompletedListener(InitializationCompletedListener listener)
Deregisters the provided initialization completed listener with the Directory Server.
|
static void |
deregisterInternalPlugin(InternalDirectoryServerPlugin plugin)
Deregisters the provided internal plugin with the Directory Server.
|
static void |
deregisterMonitorProvider(MonitorProvider monitorProvider)
Deregisters the specified monitor provider from the Directory Server.
|
static void |
deregisterPasswordGenerator(Dn configEntryDN)
Deregisters the provided password generator for use with the Directory Server.
|
static void |
deregisterPasswordStorageScheme(Dn configEntryDN)
Deregisters the specified password storage scheme with the Directory Server.
|
static void |
deregisterPasswordValidator(Dn configEntryDN)
Deregisters the provided password validator for use with the Directory Server.
|
static void |
deregisterPersistentSearch()
Deregisters a canceled persistent search.
|
static void |
deregisterRestoreTaskListener(RestoreTaskListener listener)
Deregisters the provided restore task listener with the Directory Server.
|
static void |
deregisterRetentionPolicy(Dn configEntryDN)
Deregisters the provided log retention policy with the Directory Server.
|
static void |
deregisterRotationPolicy(Dn configEntryDN)
Deregisters the provided log rotation policy with the Directory Server.
|
static void |
deregisterSASLMechanismHandler(String name)
Deregisters the provided SASL mechanism handler with the Directory Server.
|
static void |
deregisterShutdownListener(ServerShutdownListener listener)
Deregisters the provided shutdown listener with the Directory Server.
|
static void |
deregisterSupportedControl(String controlOID)
Deregisters the provided OID as a supported control for the Directory Server.
|
static void |
deregisterSupportedExtension(String oid)
Deregisters the provided extended operation handler with the Directory Server.
|
static void |
deregisterSupportedFeature(String featureOID)
Deregisters the provided OID as a supported feature for the Directory Server.
|
static void |
deregisterSupportedLDAPVersion(int supportedLDAPVersion,
ConnectionHandler<?> connectionHandler)
Deregisters the provided LDAP protocol version as supported within the Directory Server.
|
static void |
deregisterSynchronizationProvider(SynchronizationProvider<?> provider)
Deregisters the provided synchronization provider with the Directory Server.
|
static void |
deregisterVirtualAttribute(VirtualAttributeRule rule)
Deregisters the provided virtual attribute rule with the Directory Server.
|
static void |
enqueueRequest(Operation operation)
Adds the provided operation to the work queue so that it will be processed by one of the worker threads.
|
static boolean |
entryExists(Dn entryDN)
Indicates whether the specified entry exists in the Directory Server.
|
static AccountStatusNotificationHandler<?> |
getAccountStatusNotificationHandler(Dn handlerDN)
Retrieves the account status notification handler with the specified configuration entry DN.
|
static List<AlertHandler<?>> |
getAlertHandlers()
Retrieves the set of alert handlers that have been registered with the Directory Server.
|
Map<String,String> |
getAlerts()
Retrieves information about the set of alerts that this generator may produce.
|
static AuthenticatedUsers |
getAuthenticatedUsers()
Retrieves the authenticated users manager for the Directory Server.
|
static Collection<AuthenticationPolicy> |
getAuthenticationPolicies()
Returns an unmodifiable collection containing all of the authentication policies registered with the Directory
Server.
|
static AuthenticationPolicy |
getAuthenticationPolicy(Dn configEntryDN)
Retrieves the authentication policy registered for the provided configuration entry.
|
static PasswordStorageScheme<?> |
getAuthPasswordStorageScheme(String name)
Retrieves the specified authentication password storage scheme.
|
static ConcurrentHashMap<String,PasswordStorageScheme<?>> |
getAuthPasswordStorageSchemes()
Retrieves the set of authentication password storage schemes defined in the Directory Server, as a mapping
between the scheme name and the corresponding implementation.
|
static CertificateMapper<?> |
getCertificateMapper(Dn mapperDN)
Retrieves the certificate mapper registered with the provided entry DN.
|
static ClassLoader |
getClassLoader()
Gets the class loader to be used with this directory server application.
|
Dn |
getComponentEntryDN()
Retrieves the DN of the configuration entry with which this alert generator is associated.
|
static Entry |
getConfigEntry(Dn entryDN)
Deprecated.
use
getEntry(Dn) when possible |
static String |
getConfigFile()
Retrieves the path to the configuration file used to initialize the Directory Server.
|
static List<ConnectionHandler<?>> |
getConnectionHandlers()
Retrieves the set of connection handlers configured in the Directory Server.
|
static CoreConfigManager |
getCoreConfigManager()
Returns the core configuration manager.
|
static CryptoManagerImpl |
getCryptoManager()
Retrieves a reference to the Directory Server crypto manager.
|
static long |
getCurrentConnections()
Retrieves the number of client connections that are currently established.
|
static PasswordPolicy |
getDefaultPasswordPolicy()
Retrieves the default password policy for the Directory Server.
|
static Entry |
getEntry(Dn entryDN)
Retrieves the entry with the requested DN.
|
static EntryCache<?> |
getEntryCache()
Retrieves the entry cache for the Directory Server.
|
static DirectoryEnvironmentConfig |
getEnvironmentConfig()
Retrieves the environment configuration for the Directory Server.
|
static ExtendedOperationHandler<?> |
getExtendedOperationHandler(String oid)
Retrieves the handler for the extended operation for the provided OID.
|
static GroupManager |
getGroupManager()
Retrieves the Directory Server group manager.
|
static IdentityMapper<?> |
getIdentityMapper(Dn configEntryDN)
Retrieves the Directory Server identity mapper whose configuration resides in the specified configuration entry.
|
static DirectoryServer |
getInstance()
Retrieves the instance of the Directory Server that is associated with this JVM.
|
static String |
getInstanceRoot()
Retrieves the path to the instance directory for this instance of the Directory Server.
|
static Collection<JMXMBean> |
getJMXMBeans()
Retrieves the set of JMX MBeans that are associated with the server.
|
static MBeanServer |
getJMXMBeanServer()
Retrieves a reference to the JMX MBean server that is associated with the Directory Server.
|
static KeyManagerProvider<?> |
getKeyManagerProvider(Dn providerDN)
Retrieves the key manager provider registered with the provided entry DN.
|
static long |
getMaxConnections()
Retrieves the maximum number of client connections that have been established concurrently.
|
static ConcurrentMap<Dn,MonitorProvider> |
getMonitorProviders()
Retrieves the set of monitor providers that have been registered with the Directory Server, as a mapping between
the monitor name (in all lowercase characters) and the monitor implementation.
|
static Entry |
getParentEntry(Dn childDn)
Retrieves the entry that is the immediate parent of the entry having the provided DN.
|
static PasswordGenerator<?> |
getPasswordGenerator(Dn configEntryDN)
Retrieves the password generator registered with the provided configuration entry DN.
|
static PasswordStorageScheme<?> |
getPasswordStorageScheme(Dn configEntryDN)
Retrieves the password storage scheme defined in the specified configuration entry.
|
static PasswordStorageScheme<?> |
getPasswordStorageScheme(String lowerName)
Retrieves the specified password storage scheme.
|
static Collection<PasswordStorageScheme<?>> |
getPasswordStorageSchemes()
Retrieves the set of password storage schemes defined in the Directory Server, as a mapping between the
all-lowercase scheme name and the corresponding implementation.
|
static PasswordValidator<? extends PasswordValidatorCfg> |
getPasswordValidator(Dn configEntryDN)
Retrieves the password validator registered with the provided configuration entry DN.
|
static PluginConfigManager |
getPluginConfigManager()
Retrieves a reference to the Directory Server plugin configuration manager.
|
static IdentityMapper<?> |
getProxiedAuthorizationIdentityMapper()
Retrieves the identity mapper that should be used to resolve authorization IDs contained in proxied authorization
V2 controls.
|
static RetentionPolicy<?> |
getRetentionPolicy(Dn configEntryDN)
Retrieves the log retention policy registered for the provided configuration entry.
|
static RotationPolicy<?> |
getRotationPolicy(Dn configEntryDN)
Retrieves the log rotation policy registered for the provided configuration entry.
|
static SASLMechanismHandler<?> |
getSASLMechanismHandler(String name)
Retrieves the handler for the specified SASL mechanism.
|
ServerContext |
getServerContext()
Returns the server context.
|
static String |
getServerRoot()
Retrieves the path to the root directory for this instance of the Directory Server.
|
static GeneralizedTime |
getStartTime()
Retrieves the time when the Directory Server was started.
|
static SubentryManager |
getSubentryManager()
Retrieves the Directory Server subentry manager.
|
static TreeSet<String> |
getSupportedControls()
Retrieves the set of supported controls registered with the Directory Server.
|
static Set<String> |
getSupportedExtensions()
Retrieves the set of extended operations that may be processed by the Directory Server.
|
static Set<String> |
getSupportedFeatures()
Retrieves the set of supported features registered with the Directory Server.
|
static Set<Integer> |
getSupportedLDAPVersions()
Retrieves the supported LDAP versions for the Directory Server.
|
static Set<String> |
getSupportedSASLMechanisms()
Retrieves the set of SASL mechanisms that are supported by the Directory Server.
|
static List<SynchronizationProvider<SynchronizationProviderCfg>> |
getSynchronizationProviders()
Retrieves the set of synchronization providers that have been registered with the Directory Server.
|
static long |
getTotalConnections()
Retrieves the total number of client connections that have been established since the Directory Server started.
|
static TrustManagerProvider<?> |
getTrustManagerProvider(Dn providerDn)
Retrieves the trust manager provider registered with the provided entry DN.
|
static String |
getVersionString()
Retrieves the full version string for the Directory Server.
|
static Collection<VirtualAttributeRule> |
getVirtualAttributes()
Retrieves the set of virtual attribute rules registered with the Directory Server.
|
static Iterable<VirtualAttributeRule> |
getVirtualAttributes(Entry entry)
Retrieves the set of virtual attribute rules registered with the Directory Server that are applicable to the
provided entry.
|
static WorkQueue<?> |
getWorkQueue()
Retrieves a reference to the Directory Server work queue.
|
void |
initializeConfiguration(Path configFile)
Instantiates the configuration handler and loads the Directory Server configuration.
|
static void |
initializeJMX()
Performs a minimal set of JMX initialization.
|
void |
initializeSchema()
Initializes the schema handler, which is responsible for building the complete schema for the server.
|
static boolean |
isDisabled(Privilege privilege)
Indicates whether the specified privilege is disabled.
|
static boolean |
isRunning()
Indicates whether the Directory Server is currently running.
|
boolean |
isShuttingDown()
Indicates whether the server is currently in the process of shutting down.
|
static boolean |
isSupportedControl(String controlOID)
Indicates whether the specified OID is registered with the Directory Server as a supported control.
|
static Class<?> |
loadClass(String name)
Loads the named class using this directory server application's class loader.
|
static boolean |
lockdownMode()
Indicates whether the Directory Server is currently configured to operate in the lockdown mode, in which all
non-root requests will be rejected and all connection attempts from non-loopback clients will be rejected.
|
static void |
main(String[] args)
Parses the provided command-line arguments and uses that information to bootstrap and start the Directory Server.
|
static long |
newConnectionAccepted(ClientConnection clientConnection)
Indicates that a new connection has been accepted and increments the associated counters.
|
static void |
notifyBackupBeginning(LocalBackend<?> backend,
BackupConfig config)
Notifies the registered backup task listeners that the server will be beginning a backup task with the provided
information.
|
static void |
notifyBackupEnded(LocalBackend<?> backend,
BackupConfig config,
boolean successful)
Notifies the registered backup task listeners that the server has completed processing on a backup task with the
provided information.
|
static void |
notifyExportBeginning(LocalBackend<?> backend,
LDIFExportConfig config)
Notifies the registered LDIF export task listeners that the server will be beginning an export task with the
provided information.
|
static void |
notifyExportEnded(LocalBackend<?> backend,
LDIFExportConfig config,
boolean successful)
Notifies the registered LDIF export task listeners that the server has completed processing on an export task
with the provided information.
|
static void |
notifyImportBeginning(LocalBackend<?> backend,
LDIFImportConfig config)
Notifies the registered LDIF import task listeners that the server will be beginning an import task with the
provided information.
|
static void |
notifyImportEnded(LocalBackend<?> backend,
LDIFImportConfig config,
boolean successful)
Notifies the registered LDIF import task listeners that the server has completed processing on an import task
with the provided information.
|
static void |
notifyRestoreBeginning(LocalBackend<?> backend,
RestoreConfig config)
Notifies the registered restore task listeners that the server will be beginning a restore task with the provided
information.
|
static void |
notifyRestoreEnded(LocalBackend<?> backend,
RestoreConfig config,
boolean successful)
Notifies the registered restore task listeners that the server has completed processing on a restore task with
the provided information.
|
static void |
registerAccountStatusNotificationHandler(Dn handlerDN,
AccountStatusNotificationHandler<?> handler)
Registers the provided account status notification handler with the Directory Server.
|
static void |
registerAlertGenerator(AlertGenerator alertGenerator)
Registers the provided alert generator with the Directory Server.
|
static void |
registerAlertHandler(AlertHandler<?> alertHandler)
Registers the provided alert handler with the Directory Server.
|
static void |
registerAuthenticationPolicy(Dn configEntryDN,
AuthenticationPolicy policy)
Registers the provided authentication policy with the Directory Server.
|
static void |
registerBackupTaskListener(BackupTaskListener listener)
Registers the provided backup task listener with the Directory Server.
|
static void |
registerCertificateMapper(Dn mapperDN,
CertificateMapper<?> mapper)
Registers the provided certificate mapper with the Directory Server.
|
static void |
registerConnectionHandler(ConnectionHandler<? extends ConnectionHandlerCfg> handler)
Registers the provided connection handler with the Directory Server.
|
static void |
registerExportTaskListener(ExportTaskListener listener)
Registers the provided LDIF export task listener with the Directory Server.
|
static void |
registerIdentityMapper(Dn configEntryDN,
IdentityMapper<?> identityMapper)
Registers the provided identity mapper for use with the Directory Server.
|
static void |
registerImportTaskListener(ImportTaskListener listener)
Registers the provided LDIF import task listener with the Directory Server.
|
static void |
registerInitializationCompletedListener(InitializationCompletedListener listener)
Registers the provided initialization completed listener with the Directory Server so that it will be notified
when the server initialization completes.
|
static void |
registerInternalPlugin(InternalDirectoryServerPlugin plugin)
Registers the provided internal plugin with the Directory Server and ensures that it will be invoked in the
specified ways.
|
static void |
registerMonitorProvider(MonitorProvider monitorProvider)
Registers the provided monitor provider with the Directory Server.
|
static void |
registerPasswordGenerator(Dn configEntryDN,
PasswordGenerator<?> generator)
Registers the provided password generator for use with the Directory Server.
|
static void |
registerPasswordStorageScheme(Dn configEntryDN,
PasswordStorageScheme<?> scheme)
Registers the provided password storage scheme with the Directory Server.
|
static void |
registerPasswordValidator(Dn configEntryDN,
PasswordValidator<? extends PasswordValidatorCfg> validator)
Registers the provided password validator for use with the Directory Server.
|
static void |
registerPersistentSearch()
Registers a new persistent search by increasing the count of active persistent searches.
|
static void |
registerRestoreTaskListener(RestoreTaskListener listener)
Registers the provided restore task listener with the Directory Server.
|
static void |
registerRetentionPolicy(Dn configEntryDN,
RetentionPolicy<?> policy)
Registers the provided log retention policy with the Directory Server.
|
static void |
registerRotationPolicy(Dn configEntryDN,
RotationPolicy<?> policy)
Registers the provided log rotation policy with the Directory Server.
|
static void |
registerSASLMechanismHandler(String name,
SASLMechanismHandler<?> handler)
Registers the provided SASL mechanism handler with the Directory Server.
|
static void |
registerShutdownListener(ServerShutdownListener listener)
Registers the provided shutdown listener with the Directory Server so that it will be notified when the server
shuts down.
|
static void |
registerSupportedControl(String controlOID)
Registers the provided OID as a supported control for the Directory Server.
|
static void |
registerSupportedExtension(String oid,
ExtendedOperationHandler<?> handler)
Registers the provided extended operation handler with the Directory Server.
|
static void |
registerSupportedFeature(String featureOID)
Registers the provided OID as a supported feature for the Directory Server.
|
static void |
registerSupportedLDAPVersion(int supportedLDAPVersion,
ConnectionHandler<?> connectionHandler)
Registers the provided LDAP protocol version as supported within the Directory Server.
|
static void |
registerSynchronizationProvider(SynchronizationProvider<SynchronizationProviderCfg> provider)
Registers the provided synchronization provider with the Directory Server.
|
static void |
registerVirtualAttribute(VirtualAttributeRule rule)
Registers the provided virtual attribute rule with the Directory Server.
|
static DirectoryServer |
reinitialize(DirectoryEnvironmentConfig config)
Reinitializes the server following a shutdown, preparing it for a call to
startServer . |
static void |
resetDefaultPasswordPolicy()
Resets the default password policy to null.
|
static void |
restart(String className,
LocalizableMessage reason)
Causes the Directory Server to perform an in-core restart.
|
static void |
restart(String className,
LocalizableMessage reason,
DirectoryEnvironmentConfig config)
Causes the Directory Server to perform an in-core restart.
|
static void |
sendAlertNotification(AlertGenerator generator,
Severity severity,
String alertType,
LocalizableMessage alertMessage)
Sends an alert notification with the provided information.
|
static void |
sendAlertNotification(AlertGenerator generator,
String alertType,
LocalizableMessage alertMessage)
Sends an alert notification with the provided information.
|
static void |
setEntryCache(EntryCache<?> entryCache)
Specifies the entry cache that should be used by the Directory Server.
|
void |
setEnvironmentConfig(DirectoryEnvironmentConfig config)
Sets the environment configuration for the Directory Server.
|
static void |
setLockdownMode(boolean lockdownMode)
Specifies whether the server should operate in lockdown mode.
|
static void |
shutDown(String className,
LocalizableMessage reason)
Initiates the Directory Server shutdown process.
|
void |
startServer()
Starts up the Directory Server.
|
static boolean |
tryEnqueueRequest(Operation operation)
Tries to add the provided operation to the work queue if not full so that it will be processed by one of the
worker threads.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getClassName
public static final int DEFAULT_TIMEOUT
public static DirectoryServer getInstance()
public static DirectoryEnvironmentConfig getEnvironmentConfig()
public void setEnvironmentConfig(DirectoryEnvironmentConfig config) throws InitializationException
config
- The environment configuration for the Directory Server.InitializationException
- If the Directory Server is currently running.public ServerContext getServerContext()
public static boolean isRunning()
true
if the server is currently running, or false
if not.public static void bootstrapClient()
public static void initializeJMX() throws InitializationException
InitializationException
- If a problem occurs while attempting to initialize the JMX subsystem.public void initializeConfiguration(Path configFile) throws InitializationException
configFile
- The path to the file that will hold either the entire server configuration or enough information to
allow the server to access the configuration in some other repository.InitializationException
- If a problem occurs while trying to initialize the config handler.public static String getConfigFile()
public void startServer() throws ConfigException, InitializationException
ConfigException
- If there is a problem with the Directory Server configuration that prevents a critical component from
being instantiated.InitializationException
- If some other problem occurs while attempting to initialize and start the Directory Server.public static AuthenticatedUsers getAuthenticatedUsers()
public static CryptoManagerImpl getCryptoManager()
public void initializeSchema() throws InitializationException, ConfigException
ConfigException
- If there is a configuration problem with any of the schema elements.InitializationException
- If a problem occurs while initializing the schema that is not related to the server configuration.public static GroupManager getGroupManager()
public static SubentryManager getSubentryManager()
public static PluginConfigManager getPluginConfigManager()
public static void registerInternalPlugin(InternalDirectoryServerPlugin plugin)
plugin
- The internal plugin to register with the Directory Server. The plugin must specify a configuration
entry which is guaranteed to be unique.public static void deregisterInternalPlugin(InternalDirectoryServerPlugin plugin)
plugin
- The internal plugin to deregister from the Directory Server.@Deprecated public static Entry getConfigEntry(Dn entryDN)
getEntry(Dn)
when possible
The main difference with getEntry(Dn)
is that virtual attributes are not processed. This is important
when the whole directory server is not initialized yet (when initializing all backends).
entryDN
- The DN of the configuration entry to retrieve.public static String getServerRoot()
public static String getInstanceRoot()
public static GeneralizedTime getStartTime()
public static Collection<VirtualAttributeRule> getVirtualAttributes()
public static Iterable<VirtualAttributeRule> getVirtualAttributes(Entry entry)
entry
- The entry for which to retrieve the applicable virtual attribute rules.public static void registerVirtualAttribute(VirtualAttributeRule rule)
rule
- The virtual attribute rule to be registered.public static void deregisterVirtualAttribute(VirtualAttributeRule rule)
rule
- The virtual attribute rule to be deregistered.public static MBeanServer getJMXMBeanServer()
public static Collection<JMXMBean> getJMXMBeans()
public static void registerAlertGenerator(AlertGenerator alertGenerator)
alertGenerator
- The alert generator to register.public static void deregisterAlertGenerator(AlertGenerator alertGenerator)
alertGenerator
- The alert generator to deregister.public static List<AlertHandler<?>> getAlertHandlers()
public static void registerAlertHandler(AlertHandler<?> alertHandler)
alertHandler
- The alert handler to register.public static void deregisterAlertHandler(AlertHandler<?> alertHandler)
alertHandler
- The alert handler to deregister.public static void sendAlertNotification(AlertGenerator generator, String alertType, LocalizableMessage alertMessage)
generator
- The alert generator that created the alert.alertType
- The alert type name for this alert.alertMessage
- A message (possibly null
) that canpublic static void sendAlertNotification(AlertGenerator generator, Severity severity, String alertType, LocalizableMessage alertMessage)
generator
- The alert generator that created the alert.severity
- The alert severityalertType
- The alert type name for this alert.alertMessage
- A message (possibly null
) that canpublic static PasswordStorageScheme<?> getPasswordStorageScheme(Dn configEntryDN)
configEntryDN
- The DN of the configuration entry that defines the password storage scheme to retrieve.null
if no such scheme is defined.public static Collection<PasswordStorageScheme<?>> getPasswordStorageSchemes()
public static PasswordStorageScheme<?> getPasswordStorageScheme(String lowerName)
lowerName
- The name of the password storage scheme to retrieve, formatted in all lowercase characters.null
if no such scheme is defined.public static ConcurrentHashMap<String,PasswordStorageScheme<?>> getAuthPasswordStorageSchemes()
public static PasswordStorageScheme<?> getAuthPasswordStorageScheme(String name)
name
- The case-sensitive name of the authentication password storage scheme to retrieve.null
if no such scheme is defined.public static void registerPasswordStorageScheme(Dn configEntryDN, PasswordStorageScheme<?> scheme)
configEntryDN
- The DN of the configuration entry that defines the password storage scheme.scheme
- The password storage scheme to register with the Directory Server.public static void deregisterPasswordStorageScheme(Dn configEntryDN)
configEntryDN
- The DN of the configuration entry that defines the password storage scheme.public static PasswordValidator<? extends PasswordValidatorCfg> getPasswordValidator(Dn configEntryDN)
configEntryDN
- The DN of the configuration entry for which to retrieve the associated password validator.null
if no such validator is defined.public static void registerPasswordValidator(Dn configEntryDN, PasswordValidator<? extends PasswordValidatorCfg> validator)
configEntryDN
- The DN of the configuration entry that defines the specified password validator.validator
- The password validator to register with the Directory Server.public static void deregisterPasswordValidator(Dn configEntryDN)
configEntryDN
- The DN of the configuration entry that defines the password validator to deregister.public static AccountStatusNotificationHandler<?> getAccountStatusNotificationHandler(Dn handlerDN)
handlerDN
- The DN of the configuration entry associated with the account status notification handler to retrieve.null
if no such handler is defined in the
server.public static void registerAccountStatusNotificationHandler(Dn handlerDN, AccountStatusNotificationHandler<?> handler)
handlerDN
- The DN of the configuration entry that defines the provided account status notification handler.handler
- The account status notification handler to register with the Directory Server.public static void deregisterAccountStatusNotificationHandler(Dn handlerDN)
handlerDN
- The DN of the configuration entry for the account status notification handler to deregister.public static PasswordGenerator<?> getPasswordGenerator(Dn configEntryDN)
configEntryDN
- The DN of the configuration entry for which to retrieve the associated password generator.null
if no such generator is defined.public static void registerPasswordGenerator(Dn configEntryDN, PasswordGenerator<?> generator)
configEntryDN
- The DN of the configuration entry that defines the specified password generator.generator
- The password generator to register with the Directory Server.public static void deregisterPasswordGenerator(Dn configEntryDN)
configEntryDN
- The DN of the configuration entry that defines the password generator to deregister.public static Collection<AuthenticationPolicy> getAuthenticationPolicies()
public static AuthenticationPolicy getAuthenticationPolicy(Dn configEntryDN)
configEntryDN
- The DN of the configuration entry for which to retrieve the associated authentication policy.null
if there is no
such policy.public static void registerAuthenticationPolicy(Dn configEntryDN, AuthenticationPolicy policy)
configEntryDN
- The DN of the configuration entry that defines the authentication policy.policy
- The authentication policy to register with the server.public static void deregisterAuthenticationPolicy(Dn configEntryDN)
configEntryDN
- The DN of the configuration entry that defines the authentication policy to deregister.public static void resetDefaultPasswordPolicy()
public static PasswordPolicy getDefaultPasswordPolicy()
getAuthenticationPolicy
on the DN returned from
DirectoryServer.getDefaultPasswordPolicyDN()
.public static RotationPolicy<?> getRotationPolicy(Dn configEntryDN)
configEntryDN
- The DN of the configuration entry for which to retrieve the associated rotation policy.null
if there is no such
policy.public static void registerRotationPolicy(Dn configEntryDN, RotationPolicy<?> policy)
configEntryDN
- The DN of the configuration entry that defines the password policy.policy
- The rotation policy to register with the server.public static void deregisterRotationPolicy(Dn configEntryDN)
configEntryDN
- The DN of the configuration entry that defines the rotation policy to deregister.public static RetentionPolicy<?> getRetentionPolicy(Dn configEntryDN)
configEntryDN
- The DN of the configuration entry for which to retrieve the associated retention policy.null
if there is no such
policy.public static void registerRetentionPolicy(Dn configEntryDN, RetentionPolicy<?> policy)
configEntryDN
- The DN of the configuration entry that defines the password policy.policy
- The retention policy to register with the server.public static void deregisterRetentionPolicy(Dn configEntryDN)
configEntryDN
- The DN of the configuration entry that defines the retention policy to deregister.public static ConcurrentMap<Dn,MonitorProvider> getMonitorProviders()
public static void registerMonitorProvider(MonitorProvider monitorProvider)
monitorProvider
- The monitor provider to register with the Directory Server.public static void deregisterMonitorProvider(MonitorProvider monitorProvider)
monitorProvider
- The monitor provider to deregister from the Directory Server.public static EntryCache<?> getEntryCache()
public static void setEntryCache(EntryCache<?> entryCache)
entryCache
- The entry cache for the Directory Server.public static KeyManagerProvider<?> getKeyManagerProvider(Dn providerDN)
providerDN
- The DN with which the key manager provider is registered.null
if there is no such key
manager provider registered with the server.public static TrustManagerProvider<?> getTrustManagerProvider(Dn providerDn)
providerDn
- The DN with which the trust manager provider is registered.null
if there is no such
trust manager provider registered with the server.public static CertificateMapper<?> getCertificateMapper(Dn mapperDN)
mapperDN
- The DN with which the certificate mapper is registered.null
if there is no such
certificate mapper registered with the server.public static void registerCertificateMapper(Dn mapperDN, CertificateMapper<?> mapper)
mapperDN
- The DN with which to register the certificate mapper.mapper
- The certificate mapper to register with the server.public static void deregisterCertificateMapper(Dn mapperDN)
mapperDN
- The DN with which the certificate mapper is registered.public static Entry getParentEntry(Dn childDn) throws LdapException
childDn
- the DN of the entry for which the parent entry must be retrievednull
if the provided DN does not
have a parent (either because there is only a single RDN component or because this DN is a suffix defined
in the server).LdapException
- If a problem occurs while attempting to retrieve the entry.public static Entry getEntry(Dn entryDN) throws LdapException
entryDN
- The DN of the entry to retrieve.null
if it does not exist.LdapException
- If a problem occurs while attempting to retrieve the entry.public static boolean entryExists(Dn entryDN) throws LdapException
entryDN
- The DN of the entry for which to make the determination.true
if the specified entry exists in one of the backends, or false
if it does
not.LdapException
- If a problem occurs while attempting to make the determination.public static TreeSet<String> getSupportedControls()
public static boolean isSupportedControl(String controlOID)
controlOID
- The OID of the control for which to make the determination.true
if the specified OID is registered with the server as a supported control, or
false
if not.public static void registerSupportedControl(String controlOID)
controlOID
- The OID of the control to register as a supported control.public static void deregisterSupportedControl(String controlOID)
controlOID
- The OID of the control to deregister as a supported control.public static Set<String> getSupportedFeatures()
public static void registerSupportedFeature(String featureOID)
featureOID
- The OID of the feature to register as a supported feature.public static void deregisterSupportedFeature(String featureOID)
featureOID
- The OID of the feature to deregister as a supported feature.public static Set<String> getSupportedExtensions()
public static ExtendedOperationHandler<?> getExtendedOperationHandler(String oid)
oid
- The OID of the extended operation to retrieve.null
if there is none.public static void registerSupportedExtension(String oid, ExtendedOperationHandler<?> handler)
oid
- The OID for the extended operation to register.handler
- The extended operation handler to register with the Directory Server.public static void deregisterSupportedExtension(String oid)
oid
- The OID for the extended operation to deregister.public static Set<String> getSupportedSASLMechanisms()
public static SASLMechanismHandler<?> getSASLMechanismHandler(String name)
name
- The name of the SASL mechanism to retrieve.null
if there is none.public static void registerSASLMechanismHandler(String name, SASLMechanismHandler<?> handler)
name
- The name of the SASL mechanism to be registered.handler
- The SASL mechanism handler to register with the Directory Server.public static void deregisterSASLMechanismHandler(String name)
name
- The name of the SASL mechanism to be deregistered.public static Set<Integer> getSupportedLDAPVersions()
public static void registerSupportedLDAPVersion(int supportedLDAPVersion, ConnectionHandler<?> connectionHandler)
supportedLDAPVersion
- The LDAP protocol version to register as supported.connectionHandler
- The connection handler that supports the provided LDAP version. Note that multiple connection handlers
can provide support for the same LDAP versions.public static void deregisterSupportedLDAPVersion(int supportedLDAPVersion, ConnectionHandler<?> connectionHandler)
supportedLDAPVersion
- The LDAP protocol version to deregister.connectionHandler
- The connection handler that no longer supports the provided LDAP version.public static IdentityMapper<?> getIdentityMapper(Dn configEntryDN)
configEntryDN
- The DN of the configuration entry for the identity mapper to retrieve.null
if the provided entry DN is not associated with an active
identity mapper.public static void registerIdentityMapper(Dn configEntryDN, IdentityMapper<?> identityMapper)
configEntryDN
- The DN of the configuration entry in which the identity mapper definition resides.identityMapper
- The identity mapper to be registered.public static void deregisterIdentityMapper(Dn configEntryDN)
configEntryDN
- The DN of the configuration entry in which the identity mapper definition resides.public static IdentityMapper<?> getProxiedAuthorizationIdentityMapper()
null
if none is defined.public static List<ConnectionHandler<?>> getConnectionHandlers()
public static void registerConnectionHandler(ConnectionHandler<? extends ConnectionHandlerCfg> handler)
handler
- The connection handler to register with the Directory Server.public static void deregisterConnectionHandler(ConnectionHandler<?> handler)
handler
- The connection handler to deregister with the Directory Server.public static WorkQueue<?> getWorkQueue()
public static void checkCanEnqueueRequest(Operation operation, boolean isAllowedInLockDownMode) throws LdapException
operation
- The operation to be added to the work queue.isAllowedInLockDownMode
- Flag to indicate if the request can be added to the work queue regardless of the server's lock down
mode.LdapException
- If a check failed preventing the operation from being added to the queuepublic static void enqueueRequest(Operation operation) throws LdapException
operation
- The operation to be added to the work queue.LdapException
- If a problem prevents the operation from being added to the queue (e.g., the queue is full).public static boolean tryEnqueueRequest(Operation operation) throws LdapException
operation
- The operation to be added to the work queue.LdapException
- If a problem prevents the operation from being added to the queue (e.g., the queue is full).public static List<SynchronizationProvider<SynchronizationProviderCfg>> getSynchronizationProviders()
public static void registerSynchronizationProvider(SynchronizationProvider<SynchronizationProviderCfg> provider)
provider
- The synchronization provider to register.public static void deregisterSynchronizationProvider(SynchronizationProvider<?> provider)
provider
- The synchronization provider to deregister.public static CoreConfigManager getCoreConfigManager()
public static boolean isDisabled(Privilege privilege)
privilege
- The privilege for which to make the determination.true
if the specified privilege is disabled, or false
if not.public static void registerBackupTaskListener(BackupTaskListener listener)
listener
- The backup task listener to register with the Directory Server.public static void deregisterBackupTaskListener(BackupTaskListener listener)
listener
- The backup task listener to deregister with the Directory Server.public static void notifyBackupBeginning(LocalBackend<?> backend, BackupConfig config)
backend
- The backend in which the backup is to be performed.config
- The configuration for the backup to be performed.public static void notifyBackupEnded(LocalBackend<?> backend, BackupConfig config, boolean successful)
backend
- The backend in which the backup was performed.config
- The configuration for the backup that was performed.successful
- Indicates whether the backup completed successfully.public static void registerRestoreTaskListener(RestoreTaskListener listener)
listener
- The restore task listener to register with the Directory Server.public static void deregisterRestoreTaskListener(RestoreTaskListener listener)
listener
- The restore task listener to deregister with the Directory Server.public static void notifyRestoreBeginning(LocalBackend<?> backend, RestoreConfig config)
backend
- The backend in which the restore is to be performed.config
- The configuration for the restore to be performed.public static void notifyRestoreEnded(LocalBackend<?> backend, RestoreConfig config, boolean successful)
backend
- The backend in which the restore was performed.config
- The configuration for the restore that was performed.successful
- Indicates whether the restore completed successfully.public static void registerExportTaskListener(ExportTaskListener listener)
listener
- The export task listener to register with the Directory Server.public static void deregisterExportTaskListener(ExportTaskListener listener)
listener
- The export task listener to deregister with the Directory Server.public static void notifyExportBeginning(LocalBackend<?> backend, LDIFExportConfig config)
backend
- The backend in which the export is to be performed.config
- The configuration for the export to be performed.public static void notifyExportEnded(LocalBackend<?> backend, LDIFExportConfig config, boolean successful)
backend
- The backend in which the export was performed.config
- The configuration for the export that was performed.successful
- Indicates whether the export completed successfully.public static void registerImportTaskListener(ImportTaskListener listener)
listener
- The import task listener to register with the Directory Server.public static void deregisterImportTaskListener(ImportTaskListener listener)
listener
- The import task listener to deregister with the Directory Server.public static void notifyImportBeginning(LocalBackend<?> backend, LDIFImportConfig config)
backend
- The backend in which the import is to be performed.config
- The configuration for the import to be performed.public static void notifyImportEnded(LocalBackend<?> backend, LDIFImportConfig config, boolean successful)
backend
- The backend in which the import was performed.config
- The configuration for the import that was performed.successful
- Indicates whether the import completed successfully.public static void registerInitializationCompletedListener(InitializationCompletedListener listener)
listener
- The initialization competed listener to register with the Directory Server.public static void deregisterInitializationCompletedListener(InitializationCompletedListener listener)
listener
- The initialization completed listener to deregister with the Directory Server.public static void registerShutdownListener(ServerShutdownListener listener)
listener
- The shutdown listener to register with the Directory Server.public static void deregisterShutdownListener(ServerShutdownListener listener)
listener
- The shutdown listener to deregister with the Directory Server.public static void shutDown(String className, LocalizableMessage reason)
className
- The fully-qualified name of the Java class that initiated the shutdown.reason
- The human-readable reason that the directory server is shutting down.public static void restart(String className, LocalizableMessage reason)
className
- The fully-qualified name of the Java class that initiated the shutdown.reason
- The human-readable reason that the directory server is shutting down.public static void restart(String className, LocalizableMessage reason, DirectoryEnvironmentConfig config)
className
- The fully-qualified name of the Java class that initiated the shutdown.reason
- The human-readable reason that the directory server is shutting down.config
- The environment configuration to use for the server.public static DirectoryServer reinitialize(DirectoryEnvironmentConfig config) throws InitializationException
startServer
.config
- The environment configuration for the Directory Server.InitializationException
- If a problem occurs while trying to initialize the config handler or bootstrap that server.public static long newConnectionAccepted(ClientConnection clientConnection)
clientConnection
- The client connection that has been established.public static void connectionClosed(ClientConnection clientConnection)
clientConnection
- The client connection that has been closed.public static long getCurrentConnections()
public static long getMaxConnections()
public static long getTotalConnections()
public static String getVersionString()
public static void registerPersistentSearch()
public static void deregisterPersistentSearch()
public static boolean allowNewPersistentSearch()
true
if a new persistent search is allowed or false
f if not.public static boolean lockdownMode()
true
if the Directory Server is currently configured to operate in the lockdown mode, or
false
if not.public static void setLockdownMode(boolean lockdownMode)
lockdownMode
- Indicates whether the Directory Server should operate in lockdown mode.public Dn getComponentEntryDN()
AlertGenerator
getComponentEntryDN
in interface AlertGenerator
public Map<String,String> getAlerts()
AlertGenerator
getAlerts
in interface AlertGenerator
public boolean isShuttingDown()
true
if this server is currently in the process of shutting down and false
otherwise.public static void main(String[] args)
args
- The command-line arguments provided to this program.public static ClassLoader getClassLoader()
The class loader will automatically load classes from plugins where required.
Note: public
access is required for compiling the org.opends.server.snmp.SNMPConnectionHandler
.
public static Class<?> loadClass(String name) throws ClassNotFoundException
This method provided as a convenience and is equivalent to calling:
Class.forName(name, true, DirectoryServer.getClassLoader());
name
- The fully qualified name of the desired class.ClassNotFoundException
- If the class cannot be located by the specified class loader.Class.forName(String, boolean, ClassLoader)
Copyright 2010-2022 ForgeRock AS.