Class DirectoryServer

java.lang.Object
org.opends.server.core.DirectoryServer
All Implemented Interfaces:
AlertGenerator, ServerContext

public final class DirectoryServer extends Object implements AlertGenerator, ServerContext
This class defines the core of the Directory Server. It manages the startup and shutdown processes and coordinates activities between all other components.
  • Field Details

    • LOW_MEMORY_PASSWORD_STORAGE_SCHEME

      public static final String LOW_MEMORY_PASSWORD_STORAGE_SCHEME
      Indicates whether the low-memory mode should be enabled for password storage scheme. Limits the amount of memory allocated to the minimum required to work correctly when password are hashed through a single thread, without concurrency;
      See Also:
    • DEFAULT_TIMEOUT

      public static final int DEFAULT_TIMEOUT
      The default timeout used to start the server in detach mode.
      See Also:
  • Method Details

    • getInstanceRoot

      public Path getInstanceRoot()
      Description copied from interface: ServerContext
      Returns the directory of server instance.
      Specified by:
      getInstanceRoot in interface ServerContext
      Returns:
      the instance root directory
    • getServerRoot

      public Path getServerRoot()
      Description copied from interface: ServerContext
      Returns the root directory of server.
      Specified by:
      getServerRoot in interface ServerContext
      Returns:
      the server root directory
    • getThreadGroup

      public ThreadGroup getThreadGroup()
      Description copied from interface: ServerContext
      Returns the thread groups of all directory threads.
      Specified by:
      getThreadGroup in interface ServerContext
      Returns:
      the thread groups of all directory threads.
    • getSchema

      public Schema getSchema()
      Description copied from interface: ServerContext
      Returns the schema of the server.

      The schema is immutable. Any change on the schema must be done using a SchemaHandler which is available through the getSchemaHandler() method.

      Specified by:
      getSchema in interface ServerContext
      Returns:
      the schema
    • getSchemaHandler

      public SchemaHandler getSchemaHandler()
      Description copied from interface: ServerContext
      Returns the schema handler, which provides operations to the schema.
      Specified by:
      getSchemaHandler in interface ServerContext
      Returns:
      the schema handler
    • getConfigurationHandler

      public ConfigurationHandler getConfigurationHandler()
      Description copied from interface: ServerContext
      Returns the configuration handler, which provides operations to the configuration.
      Specified by:
      getConfigurationHandler in interface ServerContext
      Returns:
      the configuration handler
    • getServerManagementContext

      public ServerManagementContext getServerManagementContext()
      Description copied from interface: ServerContext
      Returns the server management context, which gives an entry point on configuration objects.
      Specified by:
      getServerManagementContext in interface ServerContext
      Returns:
      the server management context
    • getRootConfig

      public RootCfg getRootConfig()
      Description copied from interface: ServerContext
      Returns the root configuration object.

      Equivalent to calling getServerManagementContext().getRootConfiguration().

      Specified by:
      getRootConfig in interface ServerContext
      Returns:
      the root configuration object
    • getRootConnection

      public InternalClientConnection getRootConnection()
      Description copied from interface: ServerContext
      Retrieves a shared internal client connection that is authenticated as a root user.
      Specified by:
      getRootConnection in interface ServerContext
      Returns:
      A shared internal client connection that is authenticated as a root user.
    • handleRequest

      public void handleRequest(RequestContext context, Request request, Consumer<ResponseStream> responseWriter) throws LdapException
      Description copied from interface: ServerContext
      Routes an LDAP request to the appropriate backend(s) for processing.
      Specified by:
      handleRequest in interface ServerContext
      Parameters:
      context - The request context.
      request - The request.
      responseWriter - A consumer which should be used for writing response messages.
      Throws:
      LdapException - If the request failed for some reason.
    • getMemoryQuota

      public MemoryQuota getMemoryQuota()
      Description copied from interface: ServerContext
      Returns the memory quota system for reserving long term memory.
      Specified by:
      getMemoryQuota in interface ServerContext
      Returns:
      the memory quota system
    • getDiskSpaceMonitor

      public DiskSpaceMonitor getDiskSpaceMonitor()
      Description copied from interface: ServerContext
      Returns the Disk Space Monitoring service, for checking free disk space. Configure a directory to be monitored and optionally get alerted when disk space transitions from low to full to back to normal.
      Specified by:
      getDiskSpaceMonitor in interface ServerContext
      Returns:
      the Disk Space Monitoring service
    • getHttpRouter

      public org.forgerock.http.routing.Router getHttpRouter()
      Description copied from interface: ServerContext
      Returns the HTTP request router.
      Specified by:
      getHttpRouter in interface ServerContext
      Returns:
      the HTTP Router service
    • getCommonAudit

      public CommonAudit getCommonAudit()
      Description copied from interface: ServerContext
      Returns the common audit manager.
      Specified by:
      getCommonAudit in interface ServerContext
      Returns:
      the common audit manager
    • getLoggerConfigManager

      public LoggerConfigManager getLoggerConfigManager()
      Description copied from interface: ServerContext
      Returns the logger config manager.
      Specified by:
      getLoggerConfigManager in interface ServerContext
      Returns:
      the logger config manager
    • getCryptoManager

      public CryptoManager getCryptoManager()
      Description copied from interface: ServerContext
      Returns the Crypto Manager for the instance.
      Specified by:
      getCryptoManager in interface ServerContext
      Returns:
      the Crypto Manager for the instance
    • getCronExecutorService

      public ScheduledExecutorService getCronExecutorService()
      Description copied from interface: ServerContext
      Returns the UNIX's cron-like executor service.
      Specified by:
      getCronExecutorService in interface ServerContext
      Returns:
      the UNIX's cron-like executor service
    • getBackendConfigManager

      public BackendConfigManager getBackendConfigManager()
      Description copied from interface: ServerContext
      Returns the manager of backends.
      Specified by:
      getBackendConfigManager in interface ServerContext
      Returns:
      backend manager
    • getCoreConfigManager

      public CoreConfigManager getCoreConfigManager()
      Description copied from interface: ServerContext
      Returns the manager of core configuration.
      Specified by:
      getCoreConfigManager in interface ServerContext
      Returns:
      core configuration manager
    • getServiceDiscoveryMechanismConfigManager

      public ServiceDiscoveryMechanismConfigManager getServiceDiscoveryMechanismConfigManager()
      Description copied from interface: ServerContext
      Returns the Service Discovery Mechanism Config Manager.
      Specified by:
      getServiceDiscoveryMechanismConfigManager in interface ServerContext
      Returns:
      the Service Discovery Mechanism Config Manager
    • getKeyManagerProvider

      public KeyManagerProvider<?> getKeyManagerProvider(Dn keyManagerProviderDn)
      Description copied from interface: ServerContext
      Returns the key manager provider matching the provided DN.
      Specified by:
      getKeyManagerProvider in interface ServerContext
      Parameters:
      keyManagerProviderDn - the DN of the key manager provider
      Returns:
      the key manager provider, or null if none match
    • getTrustManagerProvider

      public TrustManagerProvider<?> getTrustManagerProvider(Dn trustManagerProviderDN)
      Description copied from interface: ServerContext
      Returns the trust manager provider matching the provided DN.
      Specified by:
      getTrustManagerProvider in interface ServerContext
      Parameters:
      trustManagerProviderDN - the DN of the trust manager provider
      Returns:
      the trust manager provider, or null if none match
    • getMeterRegistry

      public MeterRegistry getMeterRegistry()
      Description copied from interface: ServerContext
      Returns the global MeterRegistry that contains all metrics for all monitor providers.
      Specified by:
      getMeterRegistry in interface ServerContext
      Returns:
      The global MeterRegistry that contains all metrics for all monitor providers.
    • getCurrentConnections

      public long getCurrentConnections()
      Description copied from interface: ServerContext
      Retrieves the number of client connections that are currently established.
      Specified by:
      getCurrentConnections in interface ServerContext
      Returns:
      The number of client connections that are currently established.
    • getAdminConnectorConnections

      public long getAdminConnectorConnections()
      Description copied from interface: ServerContext
      Retrieves the number of connections that are currently established on the Administration Connector.
      Specified by:
      getAdminConnectorConnections in interface ServerContext
      Returns:
      The number of admin connections that are currently established.
    • getMaxConnections

      public long getMaxConnections()
      Description copied from interface: ServerContext
      Retrieves the maximum number of client connections that have been established concurrently.
      Specified by:
      getMaxConnections in interface ServerContext
      Returns:
      The maximum number of client connections that have been established concurrently.
    • getStartTime

      public GeneralizedTime getStartTime()
      Description copied from interface: ServerContext
      Retrieves the time when the Directory Server was started.
      Specified by:
      getStartTime in interface ServerContext
      Returns:
      The time when the Directory Server was started.
    • getTotalConnections

      public long getTotalConnections()
      Description copied from interface: ServerContext
      Retrieves the total number of client connections that have been established since the Directory Server started.
      Specified by:
      getTotalConnections in interface ServerContext
      Returns:
      The total number of client connections that have been established since the Directory Server started.
    • getLockManager

      public LockManager getLockManager()
      Description copied from interface: ServerContext
      Returns the lock manager which will be used for coordinating access to LDAP entries.
      Specified by:
      getLockManager in interface ServerContext
      Returns:
      the lock manager which will be used for coordinating access to LDAP entries
    • getHealthChecker

      public HealthChecker getHealthChecker()
      Description copied from interface: ServerContext
      Returns the HealthChecker that aggregates all the HealthStatusProvider for diagnosing the global server health.
      Specified by:
      getHealthChecker in interface ServerContext
      Returns:
      The health-checker for diagnosing the global server health.
    • getStdoutAtProcessStart

      public PrintStream getStdoutAtProcessStart()
      Description copied from interface: ServerContext
      Returns the original stdout at the time the process started, before its redefinition by DJ.
      Specified by:
      getStdoutAtProcessStart in interface ServerContext
      Returns:
      the original stdout at the time the process started, before its redefinition by DJ
    • registerBackupStorageProvider

      public void registerBackupStorageProvider(BackupStorageProvider backupStorageProvider)
      Description copied from interface: ServerContext
      Registers a backup storage provider.
      Specified by:
      registerBackupStorageProvider in interface ServerContext
      Parameters:
      backupStorageProvider - The backup storage provider to register with the Directory Server.
    • deregisterBackupStorageProvider

      public void deregisterBackupStorageProvider(BackupStorageProvider backupStorageProvider)
      Description copied from interface: ServerContext
      Deregisters a backup storage provider.
      Specified by:
      deregisterBackupStorageProvider in interface ServerContext
      Parameters:
      backupStorageProvider - The backup storage provider to deregister from the Directory Server.
    • getBackupStorageProvider

      public BackupStorageProvider getBackupStorageProvider(String storageScheme)
      Description copied from interface: ServerContext
      Returns the backup storage provider that supports the given storage scheme or null if no such storage provider hase been found.
      Specified by:
      getBackupStorageProvider in interface ServerContext
      Parameters:
      storageScheme - The storage scheme.
      Returns:
      The backup storage provider that supports the given storage scheme or null if no such storage provider hase been found.
    • registerMonitorProvider

      public void registerMonitorProvider(MonitorProvider monitorProvider)
      Description copied from interface: ServerContext
      Registers the provided monitor provider with the Directory Server. Note that if a monitor provider is already registered with the specified name, then it will be replaced with the provided implementation.
      Specified by:
      registerMonitorProvider in interface ServerContext
      Parameters:
      monitorProvider - The monitor provider to register with the Directory Server.
    • deregisterMonitorProvider

      public void deregisterMonitorProvider(MonitorProvider monitorProvider)
      Description copied from interface: ServerContext
      Deregisters the specified monitor provider from the Directory Server. If no such monitor provider is registered, no action will be taken.
      Specified by:
      deregisterMonitorProvider in interface ServerContext
      Parameters:
      monitorProvider - The monitor provider to deregister from the Directory Server.
    • getLocalProcessId

      public ProcessId getLocalProcessId()
      Description copied from interface: ServerContext
      Returns the unique identifier for this server process.

      The process ID is generated when the server starts and will never be re-used. It can be used for quickly detecting whether a server component is connecting to another server component within the same process, e.g. when a DS connects to an RS within the same JVM.

      Specified by:
      getLocalProcessId in interface ServerContext
      Returns:
      the current process ID of this server.
    • getTopology

      public Topology getTopology()
      Description copied from interface: ServerContext
      Returns the topology this server participates in.
      Specified by:
      getTopology in interface ServerContext
      Returns:
      the topology this server participates in
    • isOffline

      public boolean isOffline()
      Description copied from interface: ServerContext
      Returns true if the server is currently offline (i.e. a tool is being run instead).
      Specified by:
      isOffline in interface ServerContext
      Returns:
      true if the server is currently offline, or false if not.
    • getInstance

      public static DirectoryServer getInstance()
      Retrieves the instance of the Directory Server that is associated with this JVM.
      Returns:
      The instance of the Directory Server that is associated with this JVM.
    • getEnvironmentConfig

      public DirectoryEnvironmentConfig getEnvironmentConfig()
      Description copied from interface: ServerContext
      Retrieves the environment configuration for the Directory Server.
      Specified by:
      getEnvironmentConfig in interface ServerContext
      Returns:
      The environment configuration for the Directory Server.
    • setEnvironmentConfig

      public void setEnvironmentConfig(DirectoryEnvironmentConfig config) throws InitializationException
      Sets the environment configuration for the Directory Server. This method may only be invoked when the server is not running.
      Parameters:
      config - The environment configuration for the Directory Server.
      Throws:
      InitializationException - If the Directory Server is currently running.
    • getServerContext

      public ServerContext getServerContext()
      Returns the server context.
      Returns:
      the server context
    • isRunning

      public boolean isRunning()
      Description copied from interface: ServerContext
      Indicates whether the server is currently running.
      Specified by:
      isRunning in interface ServerContext
      Returns:
      true if the server is currently running, or false if not.
    • isAtLeastStarting

      public boolean isAtLeastStarting()
      Description copied from interface: ServerContext
      Returns true if the server is at least starting.
      Specified by:
      isAtLeastStarting in interface ServerContext
      Returns:
      true if the server is at least starting
    • bootstrapClient

      public static ServerContext bootstrapClient()
      Bootstraps the appropriate Directory Server structures that may be needed by both server and client-side tools.
      Returns:
      the bootstrapped Directory Server.
    • clientInit

      public void clientInit() throws InitializationException
      Bootstraps the appropriate Directory Server structures that may be needed by both server and client-side tools.

      Performs a minimal set of JMX initialization. This may be used by the core Directory Server or by command-line tools.

      Throws:
      InitializationException - If a problem occurs while attempting to initialize the JMX subsystem.
    • initializeConfiguration

      public void initializeConfiguration(Path configFile) throws InitializationException
      Instantiates the configuration handler and loads the Directory Server configuration.
      Parameters:
      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.
      Throws:
      InitializationException - If a problem occurs while trying to initialize the config handler.
    • startServer

      public void startServer() throws ConfigException, InitializationException
      Starts up the Directory Server. It must have already been bootstrapped and cannot be running.
      Throws:
      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.
    • getAuthenticatedUsers

      public AuthenticatedUsers getAuthenticatedUsers()
      Description copied from interface: ServerContext
      Retrieves the authenticated users manager for the Directory Server.
      Specified by:
      getAuthenticatedUsers in interface ServerContext
      Returns:
      The authenticated users manager for the Directory Server.
    • getMailServerManager

      public MailServerConfigManager getMailServerManager()
      Description copied from interface: ServerContext
      Retrieves the mail servers manager for the Directory Server.
      Specified by:
      getMailServerManager in interface ServerContext
      Returns:
      The mail servers manager for this Directory Server.
    • initializeSchema

      public void initializeSchema() throws InitializationException, ConfigException
      Initializes the schema handler, which is responsible for building the complete schema for the server.
      Throws:
      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.
    • getGroupManager

      public GroupManager getGroupManager()
      Description copied from interface: ServerContext
      Retrieves the Directory Server group manager.
      Specified by:
      getGroupManager in interface ServerContext
      Returns:
      The Directory Server group manager.
    • getSubentryManager

      public SubentryManager getSubentryManager()
      Description copied from interface: ServerContext
      Retrieves the Directory Server subentry manager.
      Specified by:
      getSubentryManager in interface ServerContext
      Returns:
      The Directory Server subentry manager.
    • getPluginConfigManager

      public PluginConfigManager getPluginConfigManager()
      Description copied from interface: ServerContext
      Retrieves a reference to the Directory Server plugin configuration manager.
      Specified by:
      getPluginConfigManager in interface ServerContext
      Returns:
      A reference to the Directory Server plugin configuration manager.
    • registerInternalPlugin

      public void registerInternalPlugin(InternalDirectoryServerPlugin plugin)
      Description copied from interface: ServerContext
      Registers the provided internal plugin with the Directory Server and ensures that it will be invoked in the specified ways.
      Specified by:
      registerInternalPlugin in interface ServerContext
      Parameters:
      plugin - The internal plugin to register with the Directory Server. The plugin must specify a configuration entry which is guaranteed to be unique.
    • deregisterInternalPlugin

      public void deregisterInternalPlugin(InternalDirectoryServerPlugin plugin)
      Description copied from interface: ServerContext
      Deregisters the provided internal plugin with the Directory Server.
      Specified by:
      deregisterInternalPlugin in interface ServerContext
      Parameters:
      plugin - The internal plugin to deregister from the Directory Server.
    • getConfigEntry

      @Deprecated public Entry getConfigEntry(Dn entryDN)
      Deprecated.
      use getEntry(Dn) when possible
      Retrieves the requested entry from the Directory Server configuration.

      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).

      Specified by:
      getConfigEntry in interface ServerContext
      Parameters:
      entryDN - The DN of the configuration entry to retrieve.
      Returns:
      The requested entry from the Directory Server configuration.
    • getVirtualAttributes

      public Collection<VirtualAttributeRule> getVirtualAttributes()
      Description copied from interface: ServerContext
      Retrieves the set of virtual attribute rules registered with the Directory Server.
      Specified by:
      getVirtualAttributes in interface ServerContext
      Returns:
      The set of virtual attribute rules registered with the Directory Server.
    • getVirtualAttributes

      public Iterable<VirtualAttributeRule> getVirtualAttributes(Entry entry)
      Description copied from interface: ServerContext
      Retrieves the set of virtual attribute rules registered with the Directory Server that are applicable to the provided entry.
      Specified by:
      getVirtualAttributes in interface ServerContext
      Parameters:
      entry - The entry for which to retrieve the applicable virtual attribute rules.
      Returns:
      The set of virtual attribute rules registered with the Directory Server that apply to the given entry. It may be an empty list if there are no applicable virtual attribute rules.
    • registerVirtualAttribute

      public void registerVirtualAttribute(VirtualAttributeRule rule)
      Description copied from interface: ServerContext
      Registers the provided virtual attribute rule with the Directory Server.
      Specified by:
      registerVirtualAttribute in interface ServerContext
      Parameters:
      rule - The virtual attribute rule to be registered.
    • deregisterVirtualAttribute

      public void deregisterVirtualAttribute(VirtualAttributeRule rule)
      Description copied from interface: ServerContext
      Deregisters the provided virtual attribute rule with the Directory Server.
      Specified by:
      deregisterVirtualAttribute in interface ServerContext
      Parameters:
      rule - The virtual attribute rule to be deregistered.
    • getJMXMBeanServer

      public MBeanServer getJMXMBeanServer()
      Description copied from interface: ServerContext
      Retrieves a reference to the JMX MBean server that is associated with the Directory Server.
      Specified by:
      getJMXMBeanServer in interface ServerContext
      Returns:
      The JMX MBean server that is associated with the Directory Server.
    • getJMXMBeans

      public Collection<JMXMBean> getJMXMBeans()
      Description copied from interface: ServerContext
      Retrieves the set of JMX MBeans that are associated with the server.
      Specified by:
      getJMXMBeans in interface ServerContext
      Returns:
      The set of JMX MBeans that are associated with the server.
    • registerAlertGenerator

      public void registerAlertGenerator(AlertGenerator alertGenerator)
      Description copied from interface: ServerContext
      Registers the provided alert generator with the Directory Server.
      Specified by:
      registerAlertGenerator in interface ServerContext
      Parameters:
      alertGenerator - The alert generator to register.
    • deregisterAlertGenerator

      public void deregisterAlertGenerator(AlertGenerator alertGenerator)
      Description copied from interface: ServerContext
      Deregisters the provided alert generator with the Directory Server.
      Specified by:
      deregisterAlertGenerator in interface ServerContext
      Parameters:
      alertGenerator - The alert generator to deregister.
    • getAlertHandlers

      public List<AlertHandler<?>> getAlertHandlers()
      Description copied from interface: ServerContext
      Retrieves the set of alert handlers that have been registered with the Directory Server.
      Specified by:
      getAlertHandlers in interface ServerContext
      Returns:
      The set of alert handlers that have been registered with the Directory Server.
    • registerAlertHandler

      public void registerAlertHandler(AlertHandler<?> alertHandler)
      Description copied from interface: ServerContext
      Registers the provided alert handler with the Directory Server.
      Specified by:
      registerAlertHandler in interface ServerContext
      Parameters:
      alertHandler - The alert handler to register.
    • deregisterAlertHandler

      public void deregisterAlertHandler(AlertHandler<?> alertHandler)
      Description copied from interface: ServerContext
      Deregisters the provided alert handler with the Directory Server.
      Specified by:
      deregisterAlertHandler in interface ServerContext
      Parameters:
      alertHandler - The alert handler to deregister.
    • sendAlertNotification

      public void sendAlertNotification(AlertGenerator generator, Severity severity, String alertType, LocalizableMessage alertMessage)
      Description copied from interface: ServerContext
      Sends an alert notification with the provided information.
      Specified by:
      sendAlertNotification in interface ServerContext
      Parameters:
      generator - The alert generator that created the alert.
      severity - The alert severity
      alertType - The alert type name for this alert.
      alertMessage - A message (possibly null) that can
    • getPasswordStorageScheme

      public PasswordStorageScheme<?> getPasswordStorageScheme(Dn configEntryDN)
      Description copied from interface: ServerContext
      Retrieves the password storage scheme defined in the specified configuration entry.
      Specified by:
      getPasswordStorageScheme in interface ServerContext
      Parameters:
      configEntryDN - The DN of the configuration entry that defines the password storage scheme to retrieve.
      Returns:
      The requested password storage scheme, or null if no such scheme is defined.
    • getPasswordStorageSchemes

      public Collection<PasswordStorageScheme<?>> getPasswordStorageSchemes()
      Description copied from interface: ServerContext
      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.
      Specified by:
      getPasswordStorageSchemes in interface ServerContext
      Returns:
      The set of password storage schemes defined in the Directory Server.
    • getPasswordStorageScheme

      public PasswordStorageScheme<?> getPasswordStorageScheme(String lowerName)
      Description copied from interface: ServerContext
      Retrieves the specified password storage scheme.
      Specified by:
      getPasswordStorageScheme in interface ServerContext
      Parameters:
      lowerName - The name of the password storage scheme to retrieve, formatted in all lowercase characters.
      Returns:
      The requested password storage scheme, or null if no such scheme is defined.
    • getAuthPasswordStorageSchemes

      public ConcurrentMap<String,PasswordStorageScheme<?>> getAuthPasswordStorageSchemes()
      Description copied from interface: ServerContext
      Retrieves the set of authentication password storage schemes defined in the Directory Server, as a mapping between the scheme name and the corresponding implementation.
      Specified by:
      getAuthPasswordStorageSchemes in interface ServerContext
      Returns:
      The set of authentication password storage schemes defined in the Directory Server.
    • getAuthPasswordStorageScheme

      public PasswordStorageScheme<?> getAuthPasswordStorageScheme(String name)
      Description copied from interface: ServerContext
      Retrieves the specified authentication password storage scheme.
      Specified by:
      getAuthPasswordStorageScheme in interface ServerContext
      Parameters:
      name - The case-sensitive name of the authentication password storage scheme to retrieve.
      Returns:
      The requested authentication password storage scheme, or null if no such scheme is defined.
    • registerPasswordStorageScheme

      public void registerPasswordStorageScheme(Dn configEntryDN, PasswordStorageScheme<?> scheme)
      Description copied from interface: ServerContext
      Registers the provided password storage scheme with the Directory Server. If an existing password storage scheme is registered with the same name, then it will be replaced with the provided scheme.
      Specified by:
      registerPasswordStorageScheme in interface ServerContext
      Parameters:
      configEntryDN - The DN of the configuration entry that defines the password storage scheme.
      scheme - The password storage scheme to register with the Directory Server.
    • deregisterPasswordStorageScheme

      public void deregisterPasswordStorageScheme(Dn configEntryDN)
      Description copied from interface: ServerContext
      Deregisters the specified password storage scheme with the Directory Server. If no scheme is registered with the specified name, then no action will be taken.
      Specified by:
      deregisterPasswordStorageScheme in interface ServerContext
      Parameters:
      configEntryDN - The DN of the configuration entry that defines the password storage scheme.
    • getPasswordValidator

      public PasswordValidator<? extends PasswordValidatorCfg> getPasswordValidator(Dn configEntryDN)
      Description copied from interface: ServerContext
      Retrieves the password validator registered with the provided configuration entry DN.
      Specified by:
      getPasswordValidator in interface ServerContext
      Parameters:
      configEntryDN - The DN of the configuration entry for which to retrieve the associated password validator.
      Returns:
      The requested password validator, or null if no such validator is defined.
    • registerPasswordValidator

      public void registerPasswordValidator(Dn configEntryDN, PasswordValidator<? extends PasswordValidatorCfg> validator)
      Description copied from interface: ServerContext
      Registers the provided password validator for use with the Directory Server.
      Specified by:
      registerPasswordValidator in interface ServerContext
      Parameters:
      configEntryDN - The DN of the configuration entry that defines the specified password validator.
      validator - The password validator to register with the Directory Server.
    • deregisterPasswordValidator

      public void deregisterPasswordValidator(Dn configEntryDN)
      Description copied from interface: ServerContext
      Deregisters the provided password validator for use with the Directory Server.
      Specified by:
      deregisterPasswordValidator in interface ServerContext
      Parameters:
      configEntryDN - The DN of the configuration entry that defines the password validator to deregister.
    • getAccountStatusNotificationHandler

      public AccountStatusNotificationHandler<?> getAccountStatusNotificationHandler(Dn handlerDN)
      Description copied from interface: ServerContext
      Retrieves the account status notification handler with the specified configuration entry DN.
      Specified by:
      getAccountStatusNotificationHandler in interface ServerContext
      Parameters:
      handlerDN - The DN of the configuration entry associated with the account status notification handler to retrieve.
      Returns:
      The requested account status notification handler, or null if no such handler is defined in the server.
    • registerAccountStatusNotificationHandler

      public void registerAccountStatusNotificationHandler(Dn handlerDN, AccountStatusNotificationHandler<?> handler)
      Description copied from interface: ServerContext
      Registers the provided account status notification handler with the Directory Server.
      Specified by:
      registerAccountStatusNotificationHandler in interface ServerContext
      Parameters:
      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.
    • deregisterAccountStatusNotificationHandler

      public void deregisterAccountStatusNotificationHandler(Dn handlerDN)
      Description copied from interface: ServerContext
      Deregisters the specified account status notification handler with the Directory Server.
      Specified by:
      deregisterAccountStatusNotificationHandler in interface ServerContext
      Parameters:
      handlerDN - The DN of the configuration entry for the account status notification handler to deregister.
    • getPasswordGenerator

      public PasswordGenerator<?> getPasswordGenerator(Dn configEntryDN)
      Description copied from interface: ServerContext
      Retrieves the password generator registered with the provided configuration entry DN.
      Specified by:
      getPasswordGenerator in interface ServerContext
      Parameters:
      configEntryDN - The DN of the configuration entry for which to retrieve the associated password generator.
      Returns:
      The requested password generator, or null if no such generator is defined.
    • registerPasswordGenerator

      public void registerPasswordGenerator(Dn configEntryDN, PasswordGenerator<?> generator)
      Description copied from interface: ServerContext
      Registers the provided password generator for use with the Directory Server.
      Specified by:
      registerPasswordGenerator in interface ServerContext
      Parameters:
      configEntryDN - The DN of the configuration entry that defines the specified password generator.
      generator - The password generator to register with the Directory Server.
    • deregisterPasswordGenerator

      public void deregisterPasswordGenerator(Dn configEntryDN)
      Description copied from interface: ServerContext
      Deregisters the provided password generator for use with the Directory Server.
      Specified by:
      deregisterPasswordGenerator in interface ServerContext
      Parameters:
      configEntryDN - The DN of the configuration entry that defines the password generator to deregister.
    • getAuthenticationPolicies

      public Collection<AuthenticationPolicy> getAuthenticationPolicies()
      Description copied from interface: ServerContext
      Returns an unmodifiable collection containing all of the authentication policies registered with the Directory Server. The references returned are to the actual authentication policy objects currently in use by the directory server and the referenced objects must not be modified.
      Specified by:
      getAuthenticationPolicies in interface ServerContext
      Returns:
      The unmodifiable collection containing all of the authentication policies registered with the Directory Server.
    • getAuthenticationPolicy

      public AuthenticationPolicy getAuthenticationPolicy(Dn configEntryDN)
      Description copied from interface: ServerContext
      Retrieves the authentication policy registered for the provided configuration entry.
      Specified by:
      getAuthenticationPolicy in interface ServerContext
      Parameters:
      configEntryDN - The DN of the configuration entry for which to retrieve the associated authentication policy.
      Returns:
      The authentication policy registered for the provided configuration entry, or null if there is no such policy.
    • registerAuthenticationPolicy

      public void registerAuthenticationPolicy(AuthenticationPolicy policy)
      Description copied from interface: ServerContext
      Registers the provided authentication policy with the Directory Server. If a policy is already registered for the provided configuration entry DN, then it will be replaced.
      Specified by:
      registerAuthenticationPolicy in interface ServerContext
      Parameters:
      policy - The authentication policy to register with the server.
    • deregisterAuthenticationPolicy

      public void deregisterAuthenticationPolicy(Dn configEntryDN)
      Description copied from interface: ServerContext
      Deregisters the provided authentication policy with the Directory Server. If no such policy is registered, then no action will be taken.
      Specified by:
      deregisterAuthenticationPolicy in interface ServerContext
      Parameters:
      configEntryDN - The DN of the configuration entry that defines the authentication policy to deregister.
    • resetDefaultPasswordPolicy

      public void resetDefaultPasswordPolicy()
      Description copied from interface: ServerContext
      Resets the default password policy to null.
      Specified by:
      resetDefaultPasswordPolicy in interface ServerContext
    • getDefaultPasswordPolicy

      public PasswordPolicy getDefaultPasswordPolicy()
      Description copied from interface: ServerContext
      Retrieves the default password policy for the Directory Server. This method is equivalent to invoking getAuthenticationPolicy on the DN returned from DirectoryServer.getDefaultPasswordPolicyDN().
      Specified by:
      getDefaultPasswordPolicy in interface ServerContext
      Returns:
      The default password policy for the Directory Server.
    • getRotationPolicy

      public RotationPolicy<?> getRotationPolicy(Dn configEntryDN)
      Description copied from interface: ServerContext
      Retrieves the log rotation policy registered for the provided configuration entry.
      Specified by:
      getRotationPolicy in interface ServerContext
      Parameters:
      configEntryDN - The DN of the configuration entry for which to retrieve the associated rotation policy.
      Returns:
      The rotation policy registered for the provided configuration entry, or null if there is no such policy.
    • registerRotationPolicy

      public void registerRotationPolicy(Dn configEntryDN, RotationPolicy<?> policy)
      Description copied from interface: ServerContext
      Registers the provided log rotation policy with the Directory Server. If a policy is already registered for the provided configuration entry DN, then it will be replaced.
      Specified by:
      registerRotationPolicy in interface ServerContext
      Parameters:
      configEntryDN - The DN of the configuration entry that defines the password policy.
      policy - The rotation policy to register with the server.
    • deregisterRotationPolicy

      public void deregisterRotationPolicy(Dn configEntryDN)
      Description copied from interface: ServerContext
      Deregisters the provided log rotation policy with the Directory Server. If no such policy is registered, then no action will be taken.
      Specified by:
      deregisterRotationPolicy in interface ServerContext
      Parameters:
      configEntryDN - The DN of the configuration entry that defines the rotation policy to deregister.
    • getRetentionPolicy

      public RetentionPolicy<?> getRetentionPolicy(Dn configEntryDN)
      Description copied from interface: ServerContext
      Retrieves the log retention policy registered for the provided configuration entry.
      Specified by:
      getRetentionPolicy in interface ServerContext
      Parameters:
      configEntryDN - The DN of the configuration entry for which to retrieve the associated retention policy.
      Returns:
      The retention policy registered for the provided configuration entry, or null if there is no such policy.
    • registerRetentionPolicy

      public void registerRetentionPolicy(Dn configEntryDN, RetentionPolicy<?> policy)
      Description copied from interface: ServerContext
      Registers the provided log retention policy with the Directory Server. If a policy is already registered for the provided configuration entry DN, then it will be replaced.
      Specified by:
      registerRetentionPolicy in interface ServerContext
      Parameters:
      configEntryDN - The DN of the configuration entry that defines the password policy.
      policy - The retention policy to register with the server.
    • deregisterRetentionPolicy

      public void deregisterRetentionPolicy(Dn configEntryDN)
      Description copied from interface: ServerContext
      Deregisters the provided log retention policy with the Directory Server. If no such policy is registered, then no action will be taken.
      Specified by:
      deregisterRetentionPolicy in interface ServerContext
      Parameters:
      configEntryDN - The DN of the configuration entry that defines the retention policy to deregister.
    • getMonitorProviders

      public ConcurrentMap<Dn,MonitorProvider> getMonitorProviders()
      Description copied from interface: ServerContext
      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.
      Specified by:
      getMonitorProviders in interface ServerContext
      Returns:
      The set of monitor providers that have been registered with the Directory Server.
    • getEntryCache

      public EntryCache<?> getEntryCache()
      Description copied from interface: ServerContext
      Retrieves the entry cache for the Directory Server.
      Specified by:
      getEntryCache in interface ServerContext
      Returns:
      The entry cache for the Directory Server.
    • getCertificateMapper

      public CertificateMapper<?> getCertificateMapper(Dn mapperDN)
      Description copied from interface: ServerContext
      Retrieves the certificate mapper registered with the provided entry DN.
      Specified by:
      getCertificateMapper in interface ServerContext
      Parameters:
      mapperDN - The DN with which the certificate mapper is registered.
      Returns:
      The certificate mapper registered with the provided entry DN, or null if there is no such certificate mapper registered with the server.
    • registerCertificateMapper

      public void registerCertificateMapper(Dn mapperDN, CertificateMapper<?> mapper)
      Description copied from interface: ServerContext
      Registers the provided certificate mapper with the Directory Server.
      Specified by:
      registerCertificateMapper in interface ServerContext
      Parameters:
      mapperDN - The DN with which to register the certificate mapper.
      mapper - The certificate mapper to register with the server.
    • deregisterCertificateMapper

      public void deregisterCertificateMapper(Dn mapperDN)
      Description copied from interface: ServerContext
      Deregisters the specified certificate mapper with the Directory Server.
      Specified by:
      deregisterCertificateMapper in interface ServerContext
      Parameters:
      mapperDN - The DN with which the certificate mapper is registered.
    • getParentEntry

      public Entry getParentEntry(Dn childDn) throws LdapException
      Description copied from interface: ServerContext
      Retrieves the entry that is the immediate parent of the entry having the provided DN. This method does take the server's naming context configuration into account, so if the provided DN is a naming context for the server, then it will not be considered to have a parent.
      Specified by:
      getParentEntry in interface ServerContext
      Parameters:
      childDn - the DN of the entry for which the parent entry must be retrieved
      Returns:
      The entry that is the immediate parent for the provided DN, or null 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).
      Throws:
      LdapException - If a problem occurs while attempting to retrieve the entry.
    • getEntry

      public Entry getEntry(Dn entryDN) throws LdapException
      Description copied from interface: ServerContext
      Retrieves the entry with the requested DN. It will first determine which backend should be used for this DN and will then use that backend to retrieve the entry. The caller is not required to hold any locks on the specified DN.
      Specified by:
      getEntry in interface ServerContext
      Parameters:
      entryDN - The DN of the entry to retrieve.
      Returns:
      The requested entry, or null if it does not exist.
      Throws:
      LdapException - If a problem occurs while attempting to retrieve the entry.
    • entryExists

      public boolean entryExists(Dn entryDN) throws LdapException
      Description copied from interface: ServerContext
      Indicates whether the specified entry exists in the Directory Server. The caller is not required to hold any locks when invoking this method.
      Specified by:
      entryExists in interface ServerContext
      Parameters:
      entryDN - The DN of the entry for which to make the determination.
      Returns:
      true if the specified entry exists in one of the backends, or false if it does not.
      Throws:
      LdapException - If a problem occurs while attempting to make the determination.
    • getSupportedControls

      public Set<String> getSupportedControls()
      Description copied from interface: ServerContext
      Retrieves the set of supported controls registered with the Directory Server.
      Specified by:
      getSupportedControls in interface ServerContext
      Returns:
      The set of supported controls registered with the Directory Server.
    • isSupportedControl

      public boolean isSupportedControl(String controlOID)
      Description copied from interface: ServerContext
      Indicates whether the specified OID is registered with the Directory Server as a supported control.
      Specified by:
      isSupportedControl in interface ServerContext
      Parameters:
      controlOID - The OID of the control for which to make the determination.
      Returns:
      whether the specified OID is registered with the server as a supported control.
    • registerSupportedControl

      public void registerSupportedControl(String controlOID)
      Description copied from interface: ServerContext
      Registers the provided OID as a supported control for the Directory Server. This will have no effect if the specified control OID is already present in the list of supported controls.
      Specified by:
      registerSupportedControl in interface ServerContext
      Parameters:
      controlOID - The OID of the control to register as a supported control.
    • deregisterSupportedControl

      public void deregisterSupportedControl(String controlOID)
      Description copied from interface: ServerContext
      Deregisters the provided OID as a supported control for the Directory Server. This will have no effect if the specified control OID is not present in the list of supported controls.
      Specified by:
      deregisterSupportedControl in interface ServerContext
      Parameters:
      controlOID - The OID of the control to deregister as a supported control.
    • getSupportedFeatures

      public Set<String> getSupportedFeatures()
      Description copied from interface: ServerContext
      Retrieves the set of supported features registered with the Directory Server.
      Specified by:
      getSupportedFeatures in interface ServerContext
      Returns:
      The set of supported features registered with the Directory Server.
    • registerSupportedFeature

      public void registerSupportedFeature(String featureOID)
      Description copied from interface: ServerContext
      Registers the provided OID as a supported feature for the Directory Server. This will have no effect if the specified feature OID is already present in the list of supported features.
      Specified by:
      registerSupportedFeature in interface ServerContext
      Parameters:
      featureOID - The OID of the feature to register as a supported feature.
    • deregisterSupportedFeature

      public void deregisterSupportedFeature(String featureOID)
      Description copied from interface: ServerContext
      Deregisters the provided OID as a supported feature for the Directory Server. This will have no effect if the specified feature OID is not present in the list of supported features.
      Specified by:
      deregisterSupportedFeature in interface ServerContext
      Parameters:
      featureOID - The OID of the feature to deregister as a supported feature.
    • getSupportedExtensions

      public Set<String> getSupportedExtensions()
      Description copied from interface: ServerContext
      Retrieves the set of extended operations that may be processed by the Directory Server.
      Specified by:
      getSupportedExtensions in interface ServerContext
      Returns:
      The set of extended operations that may be processed by the Directory Server.
    • getExtendedOperationHandler

      public ExtendedOperationHandler<?> getExtendedOperationHandler(String oid)
      Description copied from interface: ServerContext
      Retrieves the handler for the extended operation for the provided OID.
      Specified by:
      getExtendedOperationHandler in interface ServerContext
      Parameters:
      oid - The OID of the extended operation to retrieve.
      Returns:
      The handler for the specified extended operation, or null if there is none.
    • registerSupportedExtension

      public void registerSupportedExtension(String oid, ExtendedOperationHandler<?> handler)
      Description copied from interface: ServerContext
      Registers the provided extended operation handler with the Directory Server.
      Specified by:
      registerSupportedExtension in interface ServerContext
      Parameters:
      oid - The OID for the extended operation to register.
      handler - The extended operation handler to register with the Directory Server.
    • deregisterSupportedExtension

      public void deregisterSupportedExtension(String oid)
      Description copied from interface: ServerContext
      Deregisters the provided extended operation handler with the Directory Server.
      Specified by:
      deregisterSupportedExtension in interface ServerContext
      Parameters:
      oid - The OID for the extended operation to deregister.
    • getSupportedSASLMechanisms

      public Set<String> getSupportedSASLMechanisms()
      Description copied from interface: ServerContext
      Retrieves the set of SASL mechanisms that are supported by the Directory Server.
      Specified by:
      getSupportedSASLMechanisms in interface ServerContext
      Returns:
      The set of SASL mechanisms that are supported by the Directory Server.
    • getSASLMechanismHandler

      public SASLMechanismHandler<?> getSASLMechanismHandler(String name)
      Description copied from interface: ServerContext
      Retrieves the handler for the specified SASL mechanism.
      Specified by:
      getSASLMechanismHandler in interface ServerContext
      Parameters:
      name - The name of the SASL mechanism to retrieve.
      Returns:
      The handler for the specified SASL mechanism, or null if there is none.
    • registerSASLMechanismHandler

      public void registerSASLMechanismHandler(String name, SASLMechanismHandler<?> handler)
      Description copied from interface: ServerContext
      Registers the provided SASL mechanism handler with the Directory Server.
      Specified by:
      registerSASLMechanismHandler in interface ServerContext
      Parameters:
      name - The name of the SASL mechanism to be registered.
      handler - The SASL mechanism handler to register with the Directory Server.
    • deregisterSASLMechanismHandler

      public void deregisterSASLMechanismHandler(String name)
      Description copied from interface: ServerContext
      Deregisters the provided SASL mechanism handler with the Directory Server.
      Specified by:
      deregisterSASLMechanismHandler in interface ServerContext
      Parameters:
      name - The name of the SASL mechanism to be deregistered.
    • getSupportedLDAPVersions

      public Set<Integer> getSupportedLDAPVersions()
      Description copied from interface: ServerContext
      Retrieves the supported LDAP versions for the Directory Server.
      Specified by:
      getSupportedLDAPVersions in interface ServerContext
      Returns:
      The supported LDAP versions for the Directory Server.
    • registerSupportedLDAPVersion

      public void registerSupportedLDAPVersion(int supportedLDAPVersion, ConnectionHandler<?> connectionHandler)
      Description copied from interface: ServerContext
      Registers the provided LDAP protocol version as supported within the Directory Server.
      Specified by:
      registerSupportedLDAPVersion in interface ServerContext
      Parameters:
      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.
    • deregisterSupportedLDAPVersion

      public void deregisterSupportedLDAPVersion(int supportedLDAPVersion, ConnectionHandler<?> connectionHandler)
      Description copied from interface: ServerContext
      Deregisters the provided LDAP protocol version as supported within the Directory Server.
      Specified by:
      deregisterSupportedLDAPVersion in interface ServerContext
      Parameters:
      supportedLDAPVersion - The LDAP protocol version to deregister.
      connectionHandler - The connection handler that no longer supports the provided LDAP version.
    • getIdentityMapper

      public IdentityMapper<?> getIdentityMapper(Dn configEntryDN)
      Description copied from interface: ServerContext
      Retrieves the Directory Server identity mapper whose configuration resides in the specified configuration entry.
      Specified by:
      getIdentityMapper in interface ServerContext
      Parameters:
      configEntryDN - The DN of the configuration entry for the identity mapper to retrieve.
      Returns:
      The requested identity mapper, or null if the provided entry DN is not associated with an active identity mapper.
    • getIdentityMappers

      public List<IdentityMapper<?>> getIdentityMappers(Collection<Dn> configEntriesDNs)
      Description copied from interface: ServerContext
      Retrieves the Directory Server identity mappers whose configurations reside in the specified configuration entries.
      Specified by:
      getIdentityMappers in interface ServerContext
      Parameters:
      configEntriesDNs - The list of DNs of the configuration entries for the identity mappers to retrieve.
      Returns:
      The list of identity mappers, or an empty list if the provided entries DNs are not associated with any active identity mappers.
    • registerIdentityMapper

      public void registerIdentityMapper(Dn configEntryDN, IdentityMapper<?> identityMapper)
      Description copied from interface: ServerContext
      Registers the provided identity mapper for use with the Directory Server.
      Specified by:
      registerIdentityMapper in interface ServerContext
      Parameters:
      configEntryDN - The DN of the configuration entry in which the identity mapper definition resides.
      identityMapper - The identity mapper to be registered.
    • deregisterIdentityMapper

      public void deregisterIdentityMapper(Dn configEntryDN)
      Description copied from interface: ServerContext
      Deregisters the provided identity mapper for use with the Directory Server.
      Specified by:
      deregisterIdentityMapper in interface ServerContext
      Parameters:
      configEntryDN - The DN of the configuration entry in which the identity mapper definition resides.
    • getProxiedAuthorizationIdentityMappers

      public List<IdentityMapper<?>> getProxiedAuthorizationIdentityMappers()
      Description copied from interface: ServerContext
      Retrieves the identity mappers that should be used to resolve authorization IDs contained in proxied authorization V2 controls.
      Specified by:
      getProxiedAuthorizationIdentityMappers in interface ServerContext
      Returns:
      The identity mappers that should be used to resolve authorization IDs contained in proxied authorization V2 controls, or an empty list if none is defined.
    • getConnectionHandlers

      public List<ConnectionHandler<?>> getConnectionHandlers()
      Description copied from interface: ServerContext
      Retrieves the set of connection handlers configured in the Directory Server. The returned list must not be altered.
      Specified by:
      getConnectionHandlers in interface ServerContext
      Returns:
      The set of connection handlers configured in the Directory Server.
    • registerConnectionHandler

      public void registerConnectionHandler(ConnectionHandler<? extends ConnectionHandlerCfg> handler)
      Description copied from interface: ServerContext
      Registers the provided connection handler with the Directory Server.
      Specified by:
      registerConnectionHandler in interface ServerContext
      Parameters:
      handler - The connection handler to register with the Directory Server.
    • deregisterConnectionHandler

      public void deregisterConnectionHandler(ConnectionHandler<?> handler)
      Description copied from interface: ServerContext
      Deregisters the provided connection handler with the Directory Server.
      Specified by:
      deregisterConnectionHandler in interface ServerContext
      Parameters:
      handler - The connection handler to deregister with the Directory Server.
    • getWorkQueue

      public WorkQueue<?> getWorkQueue()
      Description copied from interface: ServerContext
      Retrieves a reference to the Directory Server work queue.
      Specified by:
      getWorkQueue in interface ServerContext
      Returns:
      A reference to the Directory Server work queue.
    • getSynchronizationProviders

      public List<SynchronizationProvider<? extends SynchronizationProviderCfg>> getSynchronizationProviders()
      Description copied from interface: ServerContext
      Retrieves the set of synchronization providers that have been registered with the Directory Server.
      Specified by:
      getSynchronizationProviders in interface ServerContext
      Returns:
      The set of synchronization providers that have been registered with the Directory Server.
    • registerSynchronizationProvider

      public void registerSynchronizationProvider(SynchronizationProvider<? extends SynchronizationProviderCfg> provider)
      Description copied from interface: ServerContext
      Registers the provided synchronization provider with the Directory Server.
      Specified by:
      registerSynchronizationProvider in interface ServerContext
      Parameters:
      provider - The synchronization provider to register.
    • deregisterSynchronizationProvider

      public void deregisterSynchronizationProvider(SynchronizationProvider<?> provider)
      Description copied from interface: ServerContext
      Deregisters the provided synchronization provider with the Directory Server.
      Specified by:
      deregisterSynchronizationProvider in interface ServerContext
      Parameters:
      provider - The synchronization provider to deregister.
    • registerBackupTaskListener

      public void registerBackupTaskListener(BackupTaskListener listener)
      Registers the provided backup task listener with the Directory Server.
      Specified by:
      registerBackupTaskListener in interface ServerContext
      Parameters:
      listener - The backup task listener to register with the Directory Server.
    • deregisterBackupTaskListener

      public void deregisterBackupTaskListener(BackupTaskListener listener)
      Deregisters the provided backup task listener with the Directory Server.
      Specified by:
      deregisterBackupTaskListener in interface ServerContext
      Parameters:
      listener - The backup task listener to deregister with the Directory Server.
    • notifyBackupBeginning

      public void notifyBackupBeginning(LocalBackend<?> backend)
      Notifies the registered backup task listeners that the server will be beginning a backup task with the provided information.
      Specified by:
      notifyBackupBeginning in interface ServerContext
      Parameters:
      backend - The backend in which the backup is to be performed.
    • notifyBackupEnded

      public void notifyBackupEnded(LocalBackend<?> backend)
      Notifies the registered backup task listeners that the server has completed processing on a backup task with the provided information.
      Specified by:
      notifyBackupEnded in interface ServerContext
      Parameters:
      backend - The backend in which the backup was performed.
    • registerRestoreTaskListener

      public void registerRestoreTaskListener(RestoreTaskListener listener)
      Registers the provided restore task listener with the Directory Server.
      Specified by:
      registerRestoreTaskListener in interface ServerContext
      Parameters:
      listener - The restore task listener to register with the Directory Server.
    • deregisterRestoreTaskListener

      public void deregisterRestoreTaskListener(RestoreTaskListener listener)
      Deregisters the provided restore task listener with the Directory Server.
      Specified by:
      deregisterRestoreTaskListener in interface ServerContext
      Parameters:
      listener - The restore task listener to deregister with the Directory Server.
    • notifyRestoreBeginning

      public void notifyRestoreBeginning(LocalBackend<?> backend)
      Notifies the registered restore task listeners that the server will be beginning a restore task with the provided information.
      Specified by:
      notifyRestoreBeginning in interface ServerContext
      Parameters:
      backend - The backend in which the restore is to be performed.
    • notifyRestoreEnded

      public void notifyRestoreEnded(LocalBackend<?> backend)
      Notifies the registered restore task listeners that the server has completed processing on a restore task with the provided information.
      Specified by:
      notifyRestoreEnded in interface ServerContext
      Parameters:
      backend - The backend in which the restore was performed.
    • registerExportTaskListener

      public void registerExportTaskListener(ExportTaskListener listener)
      Registers the provided LDIF export task listener with the Directory Server.
      Specified by:
      registerExportTaskListener in interface ServerContext
      Parameters:
      listener - The export task listener to register with the Directory Server.
    • deregisterExportTaskListener

      public void deregisterExportTaskListener(ExportTaskListener listener)
      Deregisters the provided LDIF export task listener with the Directory Server.
      Specified by:
      deregisterExportTaskListener in interface ServerContext
      Parameters:
      listener - The export task listener to deregister with the Directory Server.
    • notifyExportBeginning

      public 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.
      Specified by:
      notifyExportBeginning in interface ServerContext
      Parameters:
      backend - The backend in which the export is to be performed.
      config - The configuration for the export to be performed.
    • notifyExportEnded

      public 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.
      Specified by:
      notifyExportEnded in interface ServerContext
      Parameters:
      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.
    • registerImportTaskListener

      public void registerImportTaskListener(ImportTaskListener listener)
      Registers the provided LDIF import task listener with the Directory Server.
      Specified by:
      registerImportTaskListener in interface ServerContext
      Parameters:
      listener - The import task listener to register with the Directory Server.
    • deregisterImportTaskListener

      public void deregisterImportTaskListener(ImportTaskListener listener)
      Deregisters the provided LDIF import task listener with the Directory Server.
      Specified by:
      deregisterImportTaskListener in interface ServerContext
      Parameters:
      listener - The import task listener to deregister with the Directory Server.
    • notifyImportBeginning

      public 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.
      Specified by:
      notifyImportBeginning in interface ServerContext
      Parameters:
      backend - The backend in which the import is to be performed.
      config - The configuration for the import to be performed.
    • notifyImportEnded

      public 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.
      Specified by:
      notifyImportEnded in interface ServerContext
      Parameters:
      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.
    • registerShutdownListener

      public void registerShutdownListener(ServerShutdownListener listener)
      Description copied from interface: ServerContext
      Registers the provided shutdown listener with the Directory Server so that it will be notified when the server shuts down.
      Specified by:
      registerShutdownListener in interface ServerContext
      Parameters:
      listener - The shutdown listener to register with the Directory Server.
    • deregisterShutdownListener

      public void deregisterShutdownListener(ServerShutdownListener listener)
      Description copied from interface: ServerContext
      Deregisters the provided shutdown listener with the Directory Server.
      Specified by:
      deregisterShutdownListener in interface ServerContext
      Parameters:
      listener - The shutdown listener to deregister with the Directory Server.
    • shutDown

      public static void shutDown(String className, LocalizableMessage reason)
      Initiates the Directory Server shutdown process. Note that once this has started, it should not be interrupted.
      Parameters:
      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.
    • restart

      public static void restart(String className, LocalizableMessage reason)
      Causes the Directory Server to perform an in-core restart. This will cause virtually all components of the Directory Server to shut down, and once that has completed it will be restarted.
      Parameters:
      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.
    • restart

      public static void restart(String className, LocalizableMessage reason, DirectoryEnvironmentConfig config)
      Causes the Directory Server to perform an in-core restart. This will cause virtually all components of the Directory Server to shut down, and once that has completed it will be restarted.
      Parameters:
      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.
    • reinitialize

      public static DirectoryServer reinitialize(DirectoryEnvironmentConfig config) throws InitializationException
      Reinitializes the server following a shutdown, preparing it for a call to startServer.
      Parameters:
      config - The environment configuration for the Directory Server.
      Returns:
      The new Directory Server instance created during the re-initialization process.
      Throws:
      InitializationException - If a problem occurs while trying to initialize the config handler or bootstrap that server.
    • rejectNewConnectionIfNeeded

      public void rejectNewConnectionIfNeeded(InetAddress remoteAddress, boolean isAdminConnector) throws DisconnectException
      Description copied from interface: ServerContext
      Throws a DisconnectException if the client with the provided remote address should be disconnected immediately. This method must be called before ServerContext.newConnectionAccepted(ClientConnection).
      Specified by:
      rejectNewConnectionIfNeeded in interface ServerContext
      Parameters:
      remoteAddress - The remote address of the client.
      isAdminConnector - true if the network listener is the admin connector.
      Throws:
      DisconnectException - If the client with the provided remote address should be disconnected immediately.
    • newConnectionAccepted

      public long newConnectionAccepted(ClientConnection clientConnection)
      Description copied from interface: ServerContext
      Indicates that a new connection has been accepted, increments the associated metrics and assigns a connection ID. This method must be called after ServerContext.rejectNewConnectionIfNeeded(InetAddress, boolean).
      Specified by:
      newConnectionAccepted in interface ServerContext
      Parameters:
      clientConnection - The client connection that has been established.
      Returns:
      The connection ID that should be used for this connection.
    • connectionClosed

      public void connectionClosed(ClientConnection clientConnection)
      Description copied from interface: ServerContext
      Indicates that the specified client connection has been closed.
      Specified by:
      connectionClosed in interface ServerContext
      Parameters:
      clientConnection - The client connection that has been closed.
    • registerPersistentSearch

      public void registerPersistentSearch()
      Description copied from interface: ServerContext
      Registers a new persistent search by increasing the count of active persistent searches. After receiving a persistent search request, a Local or Remote WFE must call this method to let the core server manage the count of concurrent persistent searches.
      Specified by:
      registerPersistentSearch in interface ServerContext
    • deregisterPersistentSearch

      public void deregisterPersistentSearch()
      Description copied from interface: ServerContext
      Deregisters a canceled persistent search. After a persistent search is canceled, the handler must call this method to let the core server manage the count of concurrent persistent searches.
      Specified by:
      deregisterPersistentSearch in interface ServerContext
    • allowNewPersistentSearch

      public boolean allowNewPersistentSearch()
      Description copied from interface: ServerContext
      Indicates whether a new persistent search is allowed. This is only enforced for local operations because it doesn't doesn't consume significant resources in the proxy.
      Specified by:
      allowNewPersistentSearch in interface ServerContext
      Returns:
      trueif a new persistent search is allowed or falsef if not.
    • lockdownMode

      public boolean lockdownMode()
      Description copied from interface: ServerContext
      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.
      Specified by:
      lockdownMode in interface ServerContext
      Returns:
      true if the Directory Server is currently configured to operate in the lockdown mode, or false if not.
    • setLockdownMode

      public void setLockdownMode(boolean lockdownMode)
      Description copied from interface: ServerContext
      Specifies whether the server should operate in lockdown mode.
      Specified by:
      setLockdownMode in interface ServerContext
      Parameters:
      lockdownMode - Indicates whether the Directory Server should operate in lockdown mode.
    • getComponentEntryDN

      public Dn getComponentEntryDN()
      Description copied from interface: AlertGenerator
      Retrieves the DN of the configuration entry with which this alert generator is associated.
      Specified by:
      getComponentEntryDN in interface AlertGenerator
      Returns:
      The DN of the configuration entry with which this alert generator is associated.
    • getAlerts

      public Map<String,String> getAlerts()
      Description copied from interface: AlertGenerator
      Retrieves information about the set of alerts that this generator may produce. The map returned should be between the notification type for a particular notification and the human-readable description for that notification. This alert generator must not generate any alerts with types that are not contained in this list.
      Specified by:
      getAlerts in interface AlertGenerator
      Returns:
      Information about the set of alerts that this generator may produce.
    • isShuttingDown

      public boolean isShuttingDown()
      Indicates whether the server is currently in the process of shutting down.
      Specified by:
      isShuttingDown in interface ServerContext
      Returns:
      true if this server is currently in the process of shutting down and false otherwise.
    • main

      public static void main(String[] args)
      Parses the provided command-line arguments and uses that information to bootstrap and start the Directory Server.
      Parameters:
      args - The command-line arguments provided to this program.
    • loadClass

      public static Class<?> loadClass(String name) throws ClassNotFoundException
      Loads the named class using this directory server application's class loader.

      This method provided as a convenience and is equivalent to calling:

       Class.forName(name, true, DirectoryServer.getClassLoader());
       
      Parameters:
      name - The fully qualified name of the desired class.
      Returns:
      Returns the class object representing the desired class.
      Throws:
      ClassNotFoundException - If the class cannot be located by the specified class loader.
      See Also:
    • uncaughtException

      public void uncaughtException(Thread t, Throwable e, AlertGenerator alertGenerator)
      Provides a means of handling a case in which a thread is about to die because of an unhandled exception. This method does nothing to try to prevent the death of that thread, but will at least log it so that it can be available for debugging purposes.
      Specified by:
      uncaughtException in interface ServerContext
      Parameters:
      t - The thread that threw the exception.
      e - The exception that was thrown but not properly handled.
      alertGenerator - The alert generator that will send the alert.
    • getLogAggregator

      public LogAggregator getLogAggregator()
      Description copied from interface: ServerContext
      Returns the log aggregator.
      Specified by:
      getLogAggregator in interface ServerContext
      Returns:
      the log aggregator