Class DirectoryServer
- All Implemented Interfaces:
AlertGenerator,ServerContext
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classClass that prints the version of OpenDJ server to System.out.static final classInitialize the client DirectoryServer singleton by using a fluent interface. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe default timeout used to start the server in detach mode.static final StringIndicates whether the low-memory mode should be enabled for password storage scheme. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether a new persistent search is allowed.static ServerContextBootstraps the appropriate Directory Server structures that may be needed by both server and client-side tools.voidBootstraps the appropriate Directory Server structures that may be needed by both server and client-side tools.voidconnectionClosed(ClientConnection clientConnection) Indicates that the specified client connection has been closed.voidderegisterAccountStatusNotificationHandler(Dn handlerDN) Deregisters the specified account status notification handler with the Directory Server.voidderegisterAlertGenerator(AlertGenerator alertGenerator) Deregisters the provided alert generator with the Directory Server.voidderegisterAlertHandler(AlertHandler<?> alertHandler) Deregisters the provided alert handler with the Directory Server.voidderegisterAuthenticationPolicy(Dn configEntryDN) Deregisters the provided authentication policy with the Directory Server.voidderegisterBackupStorageProvider(BackupStorageProvider backupStorageProvider) Deregisters a backup storage provider.voidDeregisters the provided backup task listener with the Directory Server.voidderegisterCertificateMapper(Dn mapperDN) Deregisters the specified certificate mapper with the Directory Server.voidderegisterConnectionHandler(ConnectionHandler<?> handler) Deregisters the provided connection handler with the Directory Server.voidDeregisters the provided LDIF export task listener with the Directory Server.voidderegisterIdentityMapper(Dn configEntryDN) Deregisters the provided identity mapper for use with the Directory Server.voidDeregisters the provided LDIF import task listener with the Directory Server.voidDeregisters the provided internal plugin with the Directory Server.voidderegisterMonitorProvider(MonitorProvider monitorProvider) Deregisters the specified monitor provider from the Directory Server.voidderegisterPasswordGenerator(Dn configEntryDN) Deregisters the provided password generator for use with the Directory Server.voidderegisterPasswordStorageScheme(Dn configEntryDN) Deregisters the specified password storage scheme with the Directory Server.voidderegisterPasswordValidator(Dn configEntryDN) Deregisters the provided password validator for use with the Directory Server.voidDeregisters a canceled persistent search.voidDeregisters the provided restore task listener with the Directory Server.voidderegisterRetentionPolicy(Dn configEntryDN) Deregisters the provided log retention policy with the Directory Server.voidderegisterRotationPolicy(Dn configEntryDN) Deregisters the provided log rotation policy with the Directory Server.voidDeregisters the provided SASL mechanism handler with the Directory Server.voidDeregisters the provided shutdown listener with the Directory Server.voidderegisterSupportedControl(String controlOID) Deregisters the provided OID as a supported control for the Directory Server.voidDeregisters the provided extended operation handler with the Directory Server.voidderegisterSupportedFeature(String featureOID) Deregisters the provided OID as a supported feature for the Directory Server.voidderegisterSupportedLDAPVersion(int supportedLDAPVersion, ConnectionHandler<?> connectionHandler) Deregisters the provided LDAP protocol version as supported within the Directory Server.voidderegisterSynchronizationProvider(SynchronizationProvider<?> provider) Deregisters the provided synchronization provider with the Directory Server.voidDeregisters the provided virtual attribute rule with the Directory Server.booleanentryExists(Dn entryDN) Indicates whether the specified entry exists in the Directory Server.getAccountStatusNotificationHandler(Dn handlerDN) Retrieves the account status notification handler with the specified configuration entry DN.longRetrieves the number of connections that are currently established on the Administration Connector.List<AlertHandler<?>>Retrieves the set of alert handlers that have been registered with the Directory Server.Retrieves information about the set of alerts that this generator may produce.Retrieves the authenticated users manager for the Directory Server.Returns an unmodifiable collection containing all of the authentication policies registered with the Directory Server.getAuthenticationPolicy(Dn configEntryDN) Retrieves the authentication policy registered for the provided configuration entry.Retrieves the specified authentication password storage scheme.Retrieves the set of authentication password storage schemes defined in the Directory Server, as a mapping between the scheme name and the corresponding implementation.Returns the manager of backends.getBackupStorageProvider(String storageScheme) Returns the backup storage provider that supports the given storage scheme ornullif no such storage provider hase been found.getCertificateMapper(Dn mapperDN) Retrieves the certificate mapper registered with the provided entry DN.Returns the common audit manager.Retrieves the DN of the configuration entry with which this alert generator is associated.getConfigEntry(Dn entryDN) Deprecated.Returns the configuration handler, which provides operations to the configuration.Retrieves the set of connection handlers configured in the Directory Server.Returns the manager of core configuration.Returns the UNIX's cron-like executor service.Returns the Crypto Manager for the instance.longRetrieves the number of client connections that are currently established.Retrieves the default password policy for the Directory Server.Returns the Disk Space Monitoring service, for checking free disk space.Retrieves the entry with the requested DN.EntryCache<?>Retrieves the entry cache for the Directory Server.Retrieves the environment configuration for the Directory Server.Retrieves the handler for the extended operation for the provided OID.Retrieves the Directory Server group manager.Returns theHealthCheckerthat aggregates all theHealthStatusProviderfor diagnosing the global server health.org.forgerock.http.routing.RouterReturns the HTTP request router.getIdentityMapper(Dn configEntryDN) Retrieves the Directory Server identity mapper whose configuration resides in the specified configuration entry.List<IdentityMapper<?>>getIdentityMappers(Collection<Dn> configEntriesDNs) Retrieves the Directory Server identity mappers whose configurations reside in the specified configuration entries.static DirectoryServerRetrieves the instance of the Directory Server that is associated with this JVM.Returns the directory of server instance.Retrieves the set of JMX MBeans that are associated with the server.Retrieves a reference to the JMX MBean server that is associated with the Directory Server.getKeyManagerProvider(Dn keyManagerProviderDn) Returns the key manager provider matching the provided DN.Returns the unique identifier for this server process.Returns the lock manager which will be used for coordinating access to LDAP entries.Returns the log aggregator.Returns the logger config manager.Retrieves the mail servers manager for the Directory Server.longRetrieves the maximum number of client connections that have been established concurrently.Returns the memory quota system for reserving long term memory.Returns the globalMeterRegistrythat contains all metrics for all monitor providers.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.getParentEntry(Dn childDn) Retrieves the entry that is the immediate parent of the entry having the provided DN.getPasswordGenerator(Dn configEntryDN) Retrieves the password generator registered with the provided configuration entry DN.getPasswordStorageScheme(String lowerName) Retrieves the specified password storage scheme.getPasswordStorageScheme(Dn configEntryDN) Retrieves the password storage scheme defined in the specified configuration entry.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.PasswordValidator<? extends PasswordValidatorCfg>getPasswordValidator(Dn configEntryDN) Retrieves the password validator registered with the provided configuration entry DN.Retrieves a reference to the Directory Server plugin configuration manager.List<IdentityMapper<?>>Retrieves the identity mappers that should be used to resolve authorization IDs contained in proxied authorization V2 controls.getRetentionPolicy(Dn configEntryDN) Retrieves the log retention policy registered for the provided configuration entry.Returns the root configuration object.Retrieves a shared internal client connection that is authenticated as a root user.getRotationPolicy(Dn configEntryDN) Retrieves the log rotation policy registered for the provided configuration entry.Retrieves the handler for the specified SASL mechanism.Returns the schema of the server.Returns the schema handler, which provides operations to the schema.Returns the server context.Returns the server management context, which gives an entry point on configuration objects.Returns the root directory of server.Returns the Service Discovery Mechanism Config Manager.Retrieves the time when the Directory Server was started.Returns the original stdout at the time the process started, before its redefinition by DJ.Retrieves the Directory Server subentry manager.Retrieves the set of supported controls registered with the Directory Server.Retrieves the set of extended operations that may be processed by the Directory Server.Retrieves the set of supported features registered with the Directory Server.Retrieves the supported LDAP versions for the Directory Server.Retrieves the set of SASL mechanisms that are supported by the Directory Server.List<SynchronizationProvider<? extends SynchronizationProviderCfg>>Retrieves the set of synchronization providers that have been registered with the Directory Server.Returns the thread groups of all directory threads.Returns the topology this server participates in.longRetrieves the total number of client connections that have been established since the Directory Server started.getTrustManagerProvider(Dn trustManagerProviderDN) Returns the trust manager provider matching the provided DN.Retrieves the set of virtual attribute rules registered with the Directory Server.getVirtualAttributes(Entry entry) Retrieves the set of virtual attribute rules registered with the Directory Server that are applicable to the provided entry.WorkQueue<?>Retrieves a reference to the Directory Server work queue.voidhandleRequest(RequestContext context, Request request, Consumer<ResponseStream> responseWriter) Routes an LDAP request to the appropriate backend(s) for processing.voidinitializeConfiguration(Path configFile) Instantiates the configuration handler and loads the Directory Server configuration.voidInitializes the schema handler, which is responsible for building the complete schema for the server.booleanReturnstrueif the server is at least starting.booleanReturnstrueif the server is currently offline (i.e.booleanIndicates whether the server is currently running.booleanIndicates whether the server is currently in the process of shutting down.booleanisSupportedControl(String controlOID) Indicates whether the specified OID is registered with the Directory Server as a supported control.static Class<?>Loads the named class using this directory server application's class loader.booleanIndicates 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 voidParses the provided command-line arguments and uses that information to bootstrap and start the Directory Server.longnewConnectionAccepted(ClientConnection clientConnection) Indicates that a new connection has been accepted, increments the associated metrics and assigns a connection ID.voidnotifyBackupBeginning(LocalBackend<?> backend) Notifies the registered backup task listeners that the server will be beginning a backup task with the provided information.voidnotifyBackupEnded(LocalBackend<?> backend) Notifies the registered backup task listeners that the server has completed processing on a backup task with the provided information.voidnotifyExportBeginning(LocalBackend<?> backend, LDIFExportConfig config) Notifies the registered LDIF export task listeners that the server will be beginning an export task with the provided information.voidnotifyExportEnded(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.voidnotifyImportBeginning(LocalBackend<?> backend, LDIFImportConfig config) Notifies the registered LDIF import task listeners that the server will be beginning an import task with the provided information.voidnotifyImportEnded(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.voidnotifyRestoreBeginning(LocalBackend<?> backend) Notifies the registered restore task listeners that the server will be beginning a restore task with the provided information.voidnotifyRestoreEnded(LocalBackend<?> backend) Notifies the registered restore task listeners that the server has completed processing on a restore task with the provided information.voidregisterAccountStatusNotificationHandler(Dn handlerDN, AccountStatusNotificationHandler<?> handler) Registers the provided account status notification handler with the Directory Server.voidregisterAlertGenerator(AlertGenerator alertGenerator) Registers the provided alert generator with the Directory Server.voidregisterAlertHandler(AlertHandler<?> alertHandler) Registers the provided alert handler with the Directory Server.voidRegisters the provided authentication policy with the Directory Server.voidregisterBackupStorageProvider(BackupStorageProvider backupStorageProvider) Registers a backup storage provider.voidregisterBackupTaskListener(BackupTaskListener listener) Registers the provided backup task listener with the Directory Server.voidregisterCertificateMapper(Dn mapperDN, CertificateMapper<?> mapper) Registers the provided certificate mapper with the Directory Server.voidregisterConnectionHandler(ConnectionHandler<? extends ConnectionHandlerCfg> handler) Registers the provided connection handler with the Directory Server.voidregisterExportTaskListener(ExportTaskListener listener) Registers the provided LDIF export task listener with the Directory Server.voidregisterIdentityMapper(Dn configEntryDN, IdentityMapper<?> identityMapper) Registers the provided identity mapper for use with the Directory Server.voidregisterImportTaskListener(ImportTaskListener listener) Registers the provided LDIF import task listener with the Directory Server.voidRegisters the provided internal plugin with the Directory Server and ensures that it will be invoked in the specified ways.voidregisterMonitorProvider(MonitorProvider monitorProvider) Registers the provided monitor provider with the Directory Server.voidregisterPasswordGenerator(Dn configEntryDN, PasswordGenerator<?> generator) Registers the provided password generator for use with the Directory Server.voidregisterPasswordStorageScheme(Dn configEntryDN, PasswordStorageScheme<?> scheme) Registers the provided password storage scheme with the Directory Server.voidregisterPasswordValidator(Dn configEntryDN, PasswordValidator<? extends PasswordValidatorCfg> validator) Registers the provided password validator for use with the Directory Server.voidRegisters a new persistent search by increasing the count of active persistent searches.voidRegisters the provided restore task listener with the Directory Server.voidregisterRetentionPolicy(Dn configEntryDN, RetentionPolicy<?> policy) Registers the provided log retention policy with the Directory Server.voidregisterRotationPolicy(Dn configEntryDN, RotationPolicy<?> policy) Registers the provided log rotation policy with the Directory Server.voidregisterSASLMechanismHandler(String name, SASLMechanismHandler<?> handler) Registers the provided SASL mechanism handler with the Directory Server.voidRegisters the provided shutdown listener with the Directory Server so that it will be notified when the server shuts down.voidregisterSupportedControl(String controlOID) Registers the provided OID as a supported control for the Directory Server.voidregisterSupportedExtension(String oid, ExtendedOperationHandler<?> handler) Registers the provided extended operation handler with the Directory Server.voidregisterSupportedFeature(String featureOID) Registers the provided OID as a supported feature for the Directory Server.voidregisterSupportedLDAPVersion(int supportedLDAPVersion, ConnectionHandler<?> connectionHandler) Registers the provided LDAP protocol version as supported within the Directory Server.voidregisterSynchronizationProvider(SynchronizationProvider<? extends SynchronizationProviderCfg> provider) Registers the provided synchronization provider with the Directory Server.voidRegisters the provided virtual attribute rule with the Directory Server.static DirectoryServerReinitializes the server following a shutdown, preparing it for a call tostartServer.voidrejectNewConnectionIfNeeded(InetAddress remoteAddress, boolean isAdminConnector) Throws aDisconnectExceptionif the client with the provided remote address should be disconnected immediately.voidResets the default password policy to null.static voidrestart(String className, LocalizableMessage reason) Causes the Directory Server to perform an in-core restart.static voidrestart(String className, LocalizableMessage reason, DirectoryEnvironmentConfig config) Causes the Directory Server to perform an in-core restart.voidsendAlertNotification(AlertGenerator generator, Severity severity, String alertType, LocalizableMessage alertMessage) Sends an alert notification with the provided information.voidSets the environment configuration for the Directory Server.voidsetLockdownMode(boolean lockdownMode) Specifies whether the server should operate in lockdown mode.static voidshutDown(String className, LocalizableMessage reason) Initiates the Directory Server shutdown process.voidStarts up the Directory Server.voiduncaughtException(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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opends.server.api.AlertGenerator
getClassNameMethods inherited from interface org.opends.server.core.ServerContext
sendAlertNotification
-
Field Details
-
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_TIMEOUTThe default timeout used to start the server in detach mode.- See Also:
-
-
Method Details
-
getInstanceRoot
Description copied from interface:ServerContextReturns the directory of server instance.- Specified by:
getInstanceRootin interfaceServerContext- Returns:
- the instance root directory
-
getServerRoot
Description copied from interface:ServerContextReturns the root directory of server.- Specified by:
getServerRootin interfaceServerContext- Returns:
- the server root directory
-
getThreadGroup
Description copied from interface:ServerContextReturns the thread groups of all directory threads.- Specified by:
getThreadGroupin interfaceServerContext- Returns:
- the thread groups of all directory threads.
-
getSchema
Description copied from interface:ServerContextReturns the schema of the server.The schema is immutable. Any change on the schema must be done using a
SchemaHandlerwhich is available through thegetSchemaHandler()method.- Specified by:
getSchemain interfaceServerContext- Returns:
- the schema
-
getSchemaHandler
Description copied from interface:ServerContextReturns the schema handler, which provides operations to the schema.- Specified by:
getSchemaHandlerin interfaceServerContext- Returns:
- the schema handler
-
getConfigurationHandler
Description copied from interface:ServerContextReturns the configuration handler, which provides operations to the configuration.- Specified by:
getConfigurationHandlerin interfaceServerContext- Returns:
- the configuration handler
-
getServerManagementContext
Description copied from interface:ServerContextReturns the server management context, which gives an entry point on configuration objects.- Specified by:
getServerManagementContextin interfaceServerContext- Returns:
- the server management context
-
getRootConfig
Description copied from interface:ServerContextReturns the root configuration object.Equivalent to calling
getServerManagementContext().getRootConfiguration().- Specified by:
getRootConfigin interfaceServerContext- Returns:
- the root configuration object
-
getRootConnection
Description copied from interface:ServerContextRetrieves a shared internal client connection that is authenticated as a root user.- Specified by:
getRootConnectionin interfaceServerContext- 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:ServerContextRoutes an LDAP request to the appropriate backend(s) for processing.- Specified by:
handleRequestin interfaceServerContext- 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
Description copied from interface:ServerContextReturns the memory quota system for reserving long term memory.- Specified by:
getMemoryQuotain interfaceServerContext- Returns:
- the memory quota system
-
getDiskSpaceMonitor
Description copied from interface:ServerContextReturns 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:
getDiskSpaceMonitorin interfaceServerContext- Returns:
- the Disk Space Monitoring service
-
getHttpRouter
public org.forgerock.http.routing.Router getHttpRouter()Description copied from interface:ServerContextReturns the HTTP request router.- Specified by:
getHttpRouterin interfaceServerContext- Returns:
- the HTTP Router service
-
getCommonAudit
Description copied from interface:ServerContextReturns the common audit manager.- Specified by:
getCommonAuditin interfaceServerContext- Returns:
- the common audit manager
-
getLoggerConfigManager
Description copied from interface:ServerContextReturns the logger config manager.- Specified by:
getLoggerConfigManagerin interfaceServerContext- Returns:
- the logger config manager
-
getCryptoManager
Description copied from interface:ServerContextReturns the Crypto Manager for the instance.- Specified by:
getCryptoManagerin interfaceServerContext- Returns:
- the Crypto Manager for the instance
-
getCronExecutorService
Description copied from interface:ServerContextReturns the UNIX's cron-like executor service.- Specified by:
getCronExecutorServicein interfaceServerContext- Returns:
- the UNIX's cron-like executor service
-
getBackendConfigManager
Description copied from interface:ServerContextReturns the manager of backends.- Specified by:
getBackendConfigManagerin interfaceServerContext- Returns:
- backend manager
-
getCoreConfigManager
Description copied from interface:ServerContextReturns the manager of core configuration.- Specified by:
getCoreConfigManagerin interfaceServerContext- Returns:
- core configuration manager
-
getServiceDiscoveryMechanismConfigManager
Description copied from interface:ServerContextReturns the Service Discovery Mechanism Config Manager.- Specified by:
getServiceDiscoveryMechanismConfigManagerin interfaceServerContext- Returns:
- the Service Discovery Mechanism Config Manager
-
getKeyManagerProvider
Description copied from interface:ServerContextReturns the key manager provider matching the provided DN.- Specified by:
getKeyManagerProviderin interfaceServerContext- Parameters:
keyManagerProviderDn- the DN of the key manager provider- Returns:
- the key manager provider, or
nullif none match
-
getTrustManagerProvider
Description copied from interface:ServerContextReturns the trust manager provider matching the provided DN.- Specified by:
getTrustManagerProviderin interfaceServerContext- Parameters:
trustManagerProviderDN- the DN of the trust manager provider- Returns:
- the trust manager provider, or
nullif none match
-
getMeterRegistry
Description copied from interface:ServerContextReturns the globalMeterRegistrythat contains all metrics for all monitor providers.- Specified by:
getMeterRegistryin interfaceServerContext- Returns:
- The global
MeterRegistrythat contains all metrics for all monitor providers.
-
getCurrentConnections
public long getCurrentConnections()Description copied from interface:ServerContextRetrieves the number of client connections that are currently established.- Specified by:
getCurrentConnectionsin interfaceServerContext- Returns:
- The number of client connections that are currently established.
-
getAdminConnectorConnections
public long getAdminConnectorConnections()Description copied from interface:ServerContextRetrieves the number of connections that are currently established on the Administration Connector.- Specified by:
getAdminConnectorConnectionsin interfaceServerContext- Returns:
- The number of admin connections that are currently established.
-
getMaxConnections
public long getMaxConnections()Description copied from interface:ServerContextRetrieves the maximum number of client connections that have been established concurrently.- Specified by:
getMaxConnectionsin interfaceServerContext- Returns:
- The maximum number of client connections that have been established concurrently.
-
getStartTime
Description copied from interface:ServerContextRetrieves the time when the Directory Server was started.- Specified by:
getStartTimein interfaceServerContext- Returns:
- The time when the Directory Server was started.
-
getTotalConnections
public long getTotalConnections()Description copied from interface:ServerContextRetrieves the total number of client connections that have been established since the Directory Server started.- Specified by:
getTotalConnectionsin interfaceServerContext- Returns:
- The total number of client connections that have been established since the Directory Server started.
-
getLockManager
Description copied from interface:ServerContextReturns the lock manager which will be used for coordinating access to LDAP entries.- Specified by:
getLockManagerin interfaceServerContext- Returns:
- the lock manager which will be used for coordinating access to LDAP entries
-
getHealthChecker
Description copied from interface:ServerContextReturns theHealthCheckerthat aggregates all theHealthStatusProviderfor diagnosing the global server health.- Specified by:
getHealthCheckerin interfaceServerContext- Returns:
- The health-checker for diagnosing the global server health.
-
getStdoutAtProcessStart
Description copied from interface:ServerContextReturns the original stdout at the time the process started, before its redefinition by DJ.- Specified by:
getStdoutAtProcessStartin interfaceServerContext- Returns:
- the original stdout at the time the process started, before its redefinition by DJ
-
registerBackupStorageProvider
Description copied from interface:ServerContextRegisters a backup storage provider.- Specified by:
registerBackupStorageProviderin interfaceServerContext- Parameters:
backupStorageProvider- The backup storage provider to register with the Directory Server.
-
deregisterBackupStorageProvider
Description copied from interface:ServerContextDeregisters a backup storage provider.- Specified by:
deregisterBackupStorageProviderin interfaceServerContext- Parameters:
backupStorageProvider- The backup storage provider to deregister from the Directory Server.
-
getBackupStorageProvider
Description copied from interface:ServerContextReturns the backup storage provider that supports the given storage scheme ornullif no such storage provider hase been found.- Specified by:
getBackupStorageProviderin interfaceServerContext- Parameters:
storageScheme- The storage scheme.- Returns:
- The backup storage provider that supports the given storage scheme or
nullif no such storage provider hase been found.
-
registerMonitorProvider
Description copied from interface:ServerContextRegisters 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:
registerMonitorProviderin interfaceServerContext- Parameters:
monitorProvider- The monitor provider to register with the Directory Server.
-
deregisterMonitorProvider
Description copied from interface:ServerContextDeregisters the specified monitor provider from the Directory Server. If no such monitor provider is registered, no action will be taken.- Specified by:
deregisterMonitorProviderin interfaceServerContext- Parameters:
monitorProvider- The monitor provider to deregister from the Directory Server.
-
getLocalProcessId
Description copied from interface:ServerContextReturns 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:
getLocalProcessIdin interfaceServerContext- Returns:
- the current process ID of this server.
-
getTopology
Description copied from interface:ServerContextReturns the topology this server participates in.- Specified by:
getTopologyin interfaceServerContext- Returns:
- the topology this server participates in
-
isOffline
public boolean isOffline()Description copied from interface:ServerContextReturnstrueif the server is currently offline (i.e. a tool is being run instead).- Specified by:
isOfflinein interfaceServerContext- Returns:
trueif the server is currently offline, orfalseif not.
-
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
Description copied from interface:ServerContextRetrieves the environment configuration for the Directory Server.- Specified by:
getEnvironmentConfigin interfaceServerContext- Returns:
- The environment configuration for the Directory Server.
-
setEnvironmentConfig
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
Returns the server context.- Returns:
- the server context
-
isRunning
public boolean isRunning()Description copied from interface:ServerContextIndicates whether the server is currently running.- Specified by:
isRunningin interfaceServerContext- Returns:
trueif the server is currently running, orfalseif not.
-
isAtLeastStarting
public boolean isAtLeastStarting()Description copied from interface:ServerContextReturnstrueif the server is at least starting.- Specified by:
isAtLeastStartingin interfaceServerContext- Returns:
trueif the server is at least starting
-
bootstrapClient
Bootstraps the appropriate Directory Server structures that may be needed by both server and client-side tools.- Returns:
- the bootstrapped Directory Server.
-
clientInit
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
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
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
Description copied from interface:ServerContextRetrieves the authenticated users manager for the Directory Server.- Specified by:
getAuthenticatedUsersin interfaceServerContext- Returns:
- The authenticated users manager for the Directory Server.
-
getMailServerManager
Description copied from interface:ServerContextRetrieves the mail servers manager for the Directory Server.- Specified by:
getMailServerManagerin interfaceServerContext- Returns:
- The mail servers manager for this Directory Server.
-
initializeSchema
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
Description copied from interface:ServerContextRetrieves the Directory Server group manager.- Specified by:
getGroupManagerin interfaceServerContext- Returns:
- The Directory Server group manager.
-
getSubentryManager
Description copied from interface:ServerContextRetrieves the Directory Server subentry manager.- Specified by:
getSubentryManagerin interfaceServerContext- Returns:
- The Directory Server subentry manager.
-
getPluginConfigManager
Description copied from interface:ServerContextRetrieves a reference to the Directory Server plugin configuration manager.- Specified by:
getPluginConfigManagerin interfaceServerContext- Returns:
- A reference to the Directory Server plugin configuration manager.
-
registerInternalPlugin
Description copied from interface:ServerContextRegisters the provided internal plugin with the Directory Server and ensures that it will be invoked in the specified ways.- Specified by:
registerInternalPluginin interfaceServerContext- 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
Description copied from interface:ServerContextDeregisters the provided internal plugin with the Directory Server.- Specified by:
deregisterInternalPluginin interfaceServerContext- Parameters:
plugin- The internal plugin to deregister from the Directory Server.
-
getConfigEntry
Deprecated.usegetEntry(Dn)when possibleRetrieves 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:
getConfigEntryin interfaceServerContext- Parameters:
entryDN- The DN of the configuration entry to retrieve.- Returns:
- The requested entry from the Directory Server configuration.
-
getVirtualAttributes
Description copied from interface:ServerContextRetrieves the set of virtual attribute rules registered with the Directory Server.- Specified by:
getVirtualAttributesin interfaceServerContext- Returns:
- The set of virtual attribute rules registered with the Directory Server.
-
getVirtualAttributes
Description copied from interface:ServerContextRetrieves the set of virtual attribute rules registered with the Directory Server that are applicable to the provided entry.- Specified by:
getVirtualAttributesin interfaceServerContext- 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
Description copied from interface:ServerContextRegisters the provided virtual attribute rule with the Directory Server.- Specified by:
registerVirtualAttributein interfaceServerContext- Parameters:
rule- The virtual attribute rule to be registered.
-
deregisterVirtualAttribute
Description copied from interface:ServerContextDeregisters the provided virtual attribute rule with the Directory Server.- Specified by:
deregisterVirtualAttributein interfaceServerContext- Parameters:
rule- The virtual attribute rule to be deregistered.
-
getJMXMBeanServer
Description copied from interface:ServerContextRetrieves a reference to the JMX MBean server that is associated with the Directory Server.- Specified by:
getJMXMBeanServerin interfaceServerContext- Returns:
- The JMX MBean server that is associated with the Directory Server.
-
getJMXMBeans
Description copied from interface:ServerContextRetrieves the set of JMX MBeans that are associated with the server.- Specified by:
getJMXMBeansin interfaceServerContext- Returns:
- The set of JMX MBeans that are associated with the server.
-
registerAlertGenerator
Description copied from interface:ServerContextRegisters the provided alert generator with the Directory Server.- Specified by:
registerAlertGeneratorin interfaceServerContext- Parameters:
alertGenerator- The alert generator to register.
-
deregisterAlertGenerator
Description copied from interface:ServerContextDeregisters the provided alert generator with the Directory Server.- Specified by:
deregisterAlertGeneratorin interfaceServerContext- Parameters:
alertGenerator- The alert generator to deregister.
-
getAlertHandlers
Description copied from interface:ServerContextRetrieves the set of alert handlers that have been registered with the Directory Server.- Specified by:
getAlertHandlersin interfaceServerContext- Returns:
- The set of alert handlers that have been registered with the Directory Server.
-
registerAlertHandler
Description copied from interface:ServerContextRegisters the provided alert handler with the Directory Server.- Specified by:
registerAlertHandlerin interfaceServerContext- Parameters:
alertHandler- The alert handler to register.
-
deregisterAlertHandler
Description copied from interface:ServerContextDeregisters the provided alert handler with the Directory Server.- Specified by:
deregisterAlertHandlerin interfaceServerContext- Parameters:
alertHandler- The alert handler to deregister.
-
sendAlertNotification
public void sendAlertNotification(AlertGenerator generator, Severity severity, String alertType, LocalizableMessage alertMessage) Description copied from interface:ServerContextSends an alert notification with the provided information.- Specified by:
sendAlertNotificationin interfaceServerContext- Parameters:
generator- The alert generator that created the alert.severity- The alert severityalertType- The alert type name for this alert.alertMessage- A message (possiblynull) that can
-
getPasswordStorageScheme
Description copied from interface:ServerContextRetrieves the password storage scheme defined in the specified configuration entry.- Specified by:
getPasswordStorageSchemein interfaceServerContext- Parameters:
configEntryDN- The DN of the configuration entry that defines the password storage scheme to retrieve.- Returns:
- The requested password storage scheme, or
nullif no such scheme is defined.
-
getPasswordStorageSchemes
Description copied from interface:ServerContextRetrieves 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:
getPasswordStorageSchemesin interfaceServerContext- Returns:
- The set of password storage schemes defined in the Directory Server.
-
getPasswordStorageScheme
Description copied from interface:ServerContextRetrieves the specified password storage scheme.- Specified by:
getPasswordStorageSchemein interfaceServerContext- Parameters:
lowerName- The name of the password storage scheme to retrieve, formatted in all lowercase characters.- Returns:
- The requested password storage scheme, or
nullif no such scheme is defined.
-
getAuthPasswordStorageSchemes
Description copied from interface:ServerContextRetrieves 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:
getAuthPasswordStorageSchemesin interfaceServerContext- Returns:
- The set of authentication password storage schemes defined in the Directory Server.
-
getAuthPasswordStorageScheme
Description copied from interface:ServerContextRetrieves the specified authentication password storage scheme.- Specified by:
getAuthPasswordStorageSchemein interfaceServerContext- Parameters:
name- The case-sensitive name of the authentication password storage scheme to retrieve.- Returns:
- The requested authentication password storage scheme, or
nullif no such scheme is defined.
-
registerPasswordStorageScheme
Description copied from interface:ServerContextRegisters 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:
registerPasswordStorageSchemein interfaceServerContext- 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
Description copied from interface:ServerContextDeregisters 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:
deregisterPasswordStorageSchemein interfaceServerContext- Parameters:
configEntryDN- The DN of the configuration entry that defines the password storage scheme.
-
getPasswordValidator
Description copied from interface:ServerContextRetrieves the password validator registered with the provided configuration entry DN.- Specified by:
getPasswordValidatorin interfaceServerContext- Parameters:
configEntryDN- The DN of the configuration entry for which to retrieve the associated password validator.- Returns:
- The requested password validator, or
nullif no such validator is defined.
-
registerPasswordValidator
public void registerPasswordValidator(Dn configEntryDN, PasswordValidator<? extends PasswordValidatorCfg> validator) Description copied from interface:ServerContextRegisters the provided password validator for use with the Directory Server.- Specified by:
registerPasswordValidatorin interfaceServerContext- 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
Description copied from interface:ServerContextDeregisters the provided password validator for use with the Directory Server.- Specified by:
deregisterPasswordValidatorin interfaceServerContext- Parameters:
configEntryDN- The DN of the configuration entry that defines the password validator to deregister.
-
getAccountStatusNotificationHandler
Description copied from interface:ServerContextRetrieves the account status notification handler with the specified configuration entry DN.- Specified by:
getAccountStatusNotificationHandlerin interfaceServerContext- 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
nullif no such handler is defined in the server.
-
registerAccountStatusNotificationHandler
public void registerAccountStatusNotificationHandler(Dn handlerDN, AccountStatusNotificationHandler<?> handler) Description copied from interface:ServerContextRegisters the provided account status notification handler with the Directory Server.- Specified by:
registerAccountStatusNotificationHandlerin interfaceServerContext- 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
Description copied from interface:ServerContextDeregisters the specified account status notification handler with the Directory Server.- Specified by:
deregisterAccountStatusNotificationHandlerin interfaceServerContext- Parameters:
handlerDN- The DN of the configuration entry for the account status notification handler to deregister.
-
getPasswordGenerator
Description copied from interface:ServerContextRetrieves the password generator registered with the provided configuration entry DN.- Specified by:
getPasswordGeneratorin interfaceServerContext- Parameters:
configEntryDN- The DN of the configuration entry for which to retrieve the associated password generator.- Returns:
- The requested password generator, or
nullif no such generator is defined.
-
registerPasswordGenerator
Description copied from interface:ServerContextRegisters the provided password generator for use with the Directory Server.- Specified by:
registerPasswordGeneratorin interfaceServerContext- 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
Description copied from interface:ServerContextDeregisters the provided password generator for use with the Directory Server.- Specified by:
deregisterPasswordGeneratorin interfaceServerContext- Parameters:
configEntryDN- The DN of the configuration entry that defines the password generator to deregister.
-
getAuthenticationPolicies
Description copied from interface:ServerContextReturns 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:
getAuthenticationPoliciesin interfaceServerContext- Returns:
- The unmodifiable collection containing all of the authentication policies registered with the Directory Server.
-
getAuthenticationPolicy
Description copied from interface:ServerContextRetrieves the authentication policy registered for the provided configuration entry.- Specified by:
getAuthenticationPolicyin interfaceServerContext- 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
nullif there is no such policy.
-
registerAuthenticationPolicy
Description copied from interface:ServerContextRegisters 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:
registerAuthenticationPolicyin interfaceServerContext- Parameters:
policy- The authentication policy to register with the server.
-
deregisterAuthenticationPolicy
Description copied from interface:ServerContextDeregisters the provided authentication policy with the Directory Server. If no such policy is registered, then no action will be taken.- Specified by:
deregisterAuthenticationPolicyin interfaceServerContext- Parameters:
configEntryDN- The DN of the configuration entry that defines the authentication policy to deregister.
-
resetDefaultPasswordPolicy
public void resetDefaultPasswordPolicy()Description copied from interface:ServerContextResets the default password policy to null.- Specified by:
resetDefaultPasswordPolicyin interfaceServerContext
-
getDefaultPasswordPolicy
Description copied from interface:ServerContextRetrieves the default password policy for the Directory Server. This method is equivalent to invokinggetAuthenticationPolicyon the DN returned fromDirectoryServer.getDefaultPasswordPolicyDN().- Specified by:
getDefaultPasswordPolicyin interfaceServerContext- Returns:
- The default password policy for the Directory Server.
-
getRotationPolicy
Description copied from interface:ServerContextRetrieves the log rotation policy registered for the provided configuration entry.- Specified by:
getRotationPolicyin interfaceServerContext- 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
nullif there is no such policy.
-
registerRotationPolicy
Description copied from interface:ServerContextRegisters 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:
registerRotationPolicyin interfaceServerContext- Parameters:
configEntryDN- The DN of the configuration entry that defines the password policy.policy- The rotation policy to register with the server.
-
deregisterRotationPolicy
Description copied from interface:ServerContextDeregisters the provided log rotation policy with the Directory Server. If no such policy is registered, then no action will be taken.- Specified by:
deregisterRotationPolicyin interfaceServerContext- Parameters:
configEntryDN- The DN of the configuration entry that defines the rotation policy to deregister.
-
getRetentionPolicy
Description copied from interface:ServerContextRetrieves the log retention policy registered for the provided configuration entry.- Specified by:
getRetentionPolicyin interfaceServerContext- 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
nullif there is no such policy.
-
registerRetentionPolicy
Description copied from interface:ServerContextRegisters 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:
registerRetentionPolicyin interfaceServerContext- Parameters:
configEntryDN- The DN of the configuration entry that defines the password policy.policy- The retention policy to register with the server.
-
deregisterRetentionPolicy
Description copied from interface:ServerContextDeregisters the provided log retention policy with the Directory Server. If no such policy is registered, then no action will be taken.- Specified by:
deregisterRetentionPolicyin interfaceServerContext- Parameters:
configEntryDN- The DN of the configuration entry that defines the retention policy to deregister.
-
getMonitorProviders
Description copied from interface:ServerContextRetrieves 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:
getMonitorProvidersin interfaceServerContext- Returns:
- The set of monitor providers that have been registered with the Directory Server.
-
getEntryCache
Description copied from interface:ServerContextRetrieves the entry cache for the Directory Server.- Specified by:
getEntryCachein interfaceServerContext- Returns:
- The entry cache for the Directory Server.
-
getCertificateMapper
Description copied from interface:ServerContextRetrieves the certificate mapper registered with the provided entry DN.- Specified by:
getCertificateMapperin interfaceServerContext- Parameters:
mapperDN- The DN with which the certificate mapper is registered.- Returns:
- The certificate mapper registered with the provided entry DN, or
nullif there is no such certificate mapper registered with the server.
-
registerCertificateMapper
Description copied from interface:ServerContextRegisters the provided certificate mapper with the Directory Server.- Specified by:
registerCertificateMapperin interfaceServerContext- Parameters:
mapperDN- The DN with which to register the certificate mapper.mapper- The certificate mapper to register with the server.
-
deregisterCertificateMapper
Description copied from interface:ServerContextDeregisters the specified certificate mapper with the Directory Server.- Specified by:
deregisterCertificateMapperin interfaceServerContext- Parameters:
mapperDN- The DN with which the certificate mapper is registered.
-
getParentEntry
Description copied from interface:ServerContextRetrieves 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:
getParentEntryin interfaceServerContext- 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
nullif 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
Description copied from interface:ServerContextRetrieves 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:
getEntryin interfaceServerContext- Parameters:
entryDN- The DN of the entry to retrieve.- Returns:
- The requested entry, or
nullif it does not exist. - Throws:
LdapException- If a problem occurs while attempting to retrieve the entry.
-
entryExists
Description copied from interface:ServerContextIndicates whether the specified entry exists in the Directory Server. The caller is not required to hold any locks when invoking this method.- Specified by:
entryExistsin interfaceServerContext- Parameters:
entryDN- The DN of the entry for which to make the determination.- Returns:
trueif the specified entry exists in one of the backends, orfalseif it does not.- Throws:
LdapException- If a problem occurs while attempting to make the determination.
-
getSupportedControls
Description copied from interface:ServerContextRetrieves the set of supported controls registered with the Directory Server.- Specified by:
getSupportedControlsin interfaceServerContext- Returns:
- The set of supported controls registered with the Directory Server.
-
isSupportedControl
Description copied from interface:ServerContextIndicates whether the specified OID is registered with the Directory Server as a supported control.- Specified by:
isSupportedControlin interfaceServerContext- 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
Description copied from interface:ServerContextRegisters 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:
registerSupportedControlin interfaceServerContext- Parameters:
controlOID- The OID of the control to register as a supported control.
-
deregisterSupportedControl
Description copied from interface:ServerContextDeregisters 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:
deregisterSupportedControlin interfaceServerContext- Parameters:
controlOID- The OID of the control to deregister as a supported control.
-
getSupportedFeatures
Description copied from interface:ServerContextRetrieves the set of supported features registered with the Directory Server.- Specified by:
getSupportedFeaturesin interfaceServerContext- Returns:
- The set of supported features registered with the Directory Server.
-
registerSupportedFeature
Description copied from interface:ServerContextRegisters 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:
registerSupportedFeaturein interfaceServerContext- Parameters:
featureOID- The OID of the feature to register as a supported feature.
-
deregisterSupportedFeature
Description copied from interface:ServerContextDeregisters 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:
deregisterSupportedFeaturein interfaceServerContext- Parameters:
featureOID- The OID of the feature to deregister as a supported feature.
-
getSupportedExtensions
Description copied from interface:ServerContextRetrieves the set of extended operations that may be processed by the Directory Server.- Specified by:
getSupportedExtensionsin interfaceServerContext- Returns:
- The set of extended operations that may be processed by the Directory Server.
-
getExtendedOperationHandler
Description copied from interface:ServerContextRetrieves the handler for the extended operation for the provided OID.- Specified by:
getExtendedOperationHandlerin interfaceServerContext- Parameters:
oid- The OID of the extended operation to retrieve.- Returns:
- The handler for the specified extended operation, or
nullif there is none.
-
registerSupportedExtension
Description copied from interface:ServerContextRegisters the provided extended operation handler with the Directory Server.- Specified by:
registerSupportedExtensionin interfaceServerContext- Parameters:
oid- The OID for the extended operation to register.handler- The extended operation handler to register with the Directory Server.
-
deregisterSupportedExtension
Description copied from interface:ServerContextDeregisters the provided extended operation handler with the Directory Server.- Specified by:
deregisterSupportedExtensionin interfaceServerContext- Parameters:
oid- The OID for the extended operation to deregister.
-
getSupportedSASLMechanisms
Description copied from interface:ServerContextRetrieves the set of SASL mechanisms that are supported by the Directory Server.- Specified by:
getSupportedSASLMechanismsin interfaceServerContext- Returns:
- The set of SASL mechanisms that are supported by the Directory Server.
-
getSASLMechanismHandler
Description copied from interface:ServerContextRetrieves the handler for the specified SASL mechanism.- Specified by:
getSASLMechanismHandlerin interfaceServerContext- Parameters:
name- The name of the SASL mechanism to retrieve.- Returns:
- The handler for the specified SASL mechanism, or
nullif there is none.
-
registerSASLMechanismHandler
Description copied from interface:ServerContextRegisters the provided SASL mechanism handler with the Directory Server.- Specified by:
registerSASLMechanismHandlerin interfaceServerContext- Parameters:
name- The name of the SASL mechanism to be registered.handler- The SASL mechanism handler to register with the Directory Server.
-
deregisterSASLMechanismHandler
Description copied from interface:ServerContextDeregisters the provided SASL mechanism handler with the Directory Server.- Specified by:
deregisterSASLMechanismHandlerin interfaceServerContext- Parameters:
name- The name of the SASL mechanism to be deregistered.
-
getSupportedLDAPVersions
Description copied from interface:ServerContextRetrieves the supported LDAP versions for the Directory Server.- Specified by:
getSupportedLDAPVersionsin interfaceServerContext- Returns:
- The supported LDAP versions for the Directory Server.
-
registerSupportedLDAPVersion
public void registerSupportedLDAPVersion(int supportedLDAPVersion, ConnectionHandler<?> connectionHandler) Description copied from interface:ServerContextRegisters the provided LDAP protocol version as supported within the Directory Server.- Specified by:
registerSupportedLDAPVersionin interfaceServerContext- 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:ServerContextDeregisters the provided LDAP protocol version as supported within the Directory Server.- Specified by:
deregisterSupportedLDAPVersionin interfaceServerContext- Parameters:
supportedLDAPVersion- The LDAP protocol version to deregister.connectionHandler- The connection handler that no longer supports the provided LDAP version.
-
getIdentityMapper
Description copied from interface:ServerContextRetrieves the Directory Server identity mapper whose configuration resides in the specified configuration entry.- Specified by:
getIdentityMapperin interfaceServerContext- Parameters:
configEntryDN- The DN of the configuration entry for the identity mapper to retrieve.- Returns:
- The requested identity mapper, or
nullif the provided entry DN is not associated with an active identity mapper.
-
getIdentityMappers
Description copied from interface:ServerContextRetrieves the Directory Server identity mappers whose configurations reside in the specified configuration entries.- Specified by:
getIdentityMappersin interfaceServerContext- 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
Description copied from interface:ServerContextRegisters the provided identity mapper for use with the Directory Server.- Specified by:
registerIdentityMapperin interfaceServerContext- Parameters:
configEntryDN- The DN of the configuration entry in which the identity mapper definition resides.identityMapper- The identity mapper to be registered.
-
deregisterIdentityMapper
Description copied from interface:ServerContextDeregisters the provided identity mapper for use with the Directory Server.- Specified by:
deregisterIdentityMapperin interfaceServerContext- Parameters:
configEntryDN- The DN of the configuration entry in which the identity mapper definition resides.
-
getProxiedAuthorizationIdentityMappers
Description copied from interface:ServerContextRetrieves the identity mappers that should be used to resolve authorization IDs contained in proxied authorization V2 controls.- Specified by:
getProxiedAuthorizationIdentityMappersin interfaceServerContext- 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
Description copied from interface:ServerContextRetrieves the set of connection handlers configured in the Directory Server. The returned list must not be altered.- Specified by:
getConnectionHandlersin interfaceServerContext- Returns:
- The set of connection handlers configured in the Directory Server.
-
registerConnectionHandler
Description copied from interface:ServerContextRegisters the provided connection handler with the Directory Server.- Specified by:
registerConnectionHandlerin interfaceServerContext- Parameters:
handler- The connection handler to register with the Directory Server.
-
deregisterConnectionHandler
Description copied from interface:ServerContextDeregisters the provided connection handler with the Directory Server.- Specified by:
deregisterConnectionHandlerin interfaceServerContext- Parameters:
handler- The connection handler to deregister with the Directory Server.
-
getWorkQueue
Description copied from interface:ServerContextRetrieves a reference to the Directory Server work queue.- Specified by:
getWorkQueuein interfaceServerContext- Returns:
- A reference to the Directory Server work queue.
-
getSynchronizationProviders
public List<SynchronizationProvider<? extends SynchronizationProviderCfg>> getSynchronizationProviders()Description copied from interface:ServerContextRetrieves the set of synchronization providers that have been registered with the Directory Server.- Specified by:
getSynchronizationProvidersin interfaceServerContext- 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:ServerContextRegisters the provided synchronization provider with the Directory Server.- Specified by:
registerSynchronizationProviderin interfaceServerContext- Parameters:
provider- The synchronization provider to register.
-
deregisterSynchronizationProvider
Description copied from interface:ServerContextDeregisters the provided synchronization provider with the Directory Server.- Specified by:
deregisterSynchronizationProviderin interfaceServerContext- Parameters:
provider- The synchronization provider to deregister.
-
registerBackupTaskListener
Registers the provided backup task listener with the Directory Server.- Specified by:
registerBackupTaskListenerin interfaceServerContext- Parameters:
listener- The backup task listener to register with the Directory Server.
-
deregisterBackupTaskListener
Deregisters the provided backup task listener with the Directory Server.- Specified by:
deregisterBackupTaskListenerin interfaceServerContext- Parameters:
listener- The backup task listener to deregister with the Directory Server.
-
notifyBackupBeginning
Notifies the registered backup task listeners that the server will be beginning a backup task with the provided information.- Specified by:
notifyBackupBeginningin interfaceServerContext- Parameters:
backend- The backend in which the backup is to be performed.
-
notifyBackupEnded
Notifies the registered backup task listeners that the server has completed processing on a backup task with the provided information.- Specified by:
notifyBackupEndedin interfaceServerContext- Parameters:
backend- The backend in which the backup was performed.
-
registerRestoreTaskListener
Registers the provided restore task listener with the Directory Server.- Specified by:
registerRestoreTaskListenerin interfaceServerContext- Parameters:
listener- The restore task listener to register with the Directory Server.
-
deregisterRestoreTaskListener
Deregisters the provided restore task listener with the Directory Server.- Specified by:
deregisterRestoreTaskListenerin interfaceServerContext- Parameters:
listener- The restore task listener to deregister with the Directory Server.
-
notifyRestoreBeginning
Notifies the registered restore task listeners that the server will be beginning a restore task with the provided information.- Specified by:
notifyRestoreBeginningin interfaceServerContext- Parameters:
backend- The backend in which the restore is to be performed.
-
notifyRestoreEnded
Notifies the registered restore task listeners that the server has completed processing on a restore task with the provided information.- Specified by:
notifyRestoreEndedin interfaceServerContext- Parameters:
backend- The backend in which the restore was performed.
-
registerExportTaskListener
Registers the provided LDIF export task listener with the Directory Server.- Specified by:
registerExportTaskListenerin interfaceServerContext- Parameters:
listener- The export task listener to register with the Directory Server.
-
deregisterExportTaskListener
Deregisters the provided LDIF export task listener with the Directory Server.- Specified by:
deregisterExportTaskListenerin interfaceServerContext- Parameters:
listener- The export task listener to deregister with the Directory Server.
-
notifyExportBeginning
Notifies the registered LDIF export task listeners that the server will be beginning an export task with the provided information.- Specified by:
notifyExportBeginningin interfaceServerContext- Parameters:
backend- The backend in which the export is to be performed.config- The configuration for the export to be performed.
-
notifyExportEnded
Notifies the registered LDIF export task listeners that the server has completed processing on an export task with the provided information.- Specified by:
notifyExportEndedin interfaceServerContext- 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
Registers the provided LDIF import task listener with the Directory Server.- Specified by:
registerImportTaskListenerin interfaceServerContext- Parameters:
listener- The import task listener to register with the Directory Server.
-
deregisterImportTaskListener
Deregisters the provided LDIF import task listener with the Directory Server.- Specified by:
deregisterImportTaskListenerin interfaceServerContext- Parameters:
listener- The import task listener to deregister with the Directory Server.
-
notifyImportBeginning
Notifies the registered LDIF import task listeners that the server will be beginning an import task with the provided information.- Specified by:
notifyImportBeginningin interfaceServerContext- Parameters:
backend- The backend in which the import is to be performed.config- The configuration for the import to be performed.
-
notifyImportEnded
Notifies the registered LDIF import task listeners that the server has completed processing on an import task with the provided information.- Specified by:
notifyImportEndedin interfaceServerContext- 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
Description copied from interface:ServerContextRegisters the provided shutdown listener with the Directory Server so that it will be notified when the server shuts down.- Specified by:
registerShutdownListenerin interfaceServerContext- Parameters:
listener- The shutdown listener to register with the Directory Server.
-
deregisterShutdownListener
Description copied from interface:ServerContextDeregisters the provided shutdown listener with the Directory Server.- Specified by:
deregisterShutdownListenerin interfaceServerContext- Parameters:
listener- The shutdown listener to deregister with the Directory Server.
-
shutDown
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
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 tostartServer.- 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:ServerContextThrows aDisconnectExceptionif the client with the provided remote address should be disconnected immediately. This method must be called beforeServerContext.newConnectionAccepted(ClientConnection).- Specified by:
rejectNewConnectionIfNeededin interfaceServerContext- Parameters:
remoteAddress- The remote address of the client.isAdminConnector-trueif the network listener is the admin connector.- Throws:
DisconnectException- If the client with the provided remote address should be disconnected immediately.
-
newConnectionAccepted
Description copied from interface:ServerContextIndicates that a new connection has been accepted, increments the associated metrics and assigns a connection ID. This method must be called afterServerContext.rejectNewConnectionIfNeeded(InetAddress, boolean).- Specified by:
newConnectionAcceptedin interfaceServerContext- Parameters:
clientConnection- The client connection that has been established.- Returns:
- The connection ID that should be used for this connection.
-
connectionClosed
Description copied from interface:ServerContextIndicates that the specified client connection has been closed.- Specified by:
connectionClosedin interfaceServerContext- Parameters:
clientConnection- The client connection that has been closed.
-
registerPersistentSearch
public void registerPersistentSearch()Description copied from interface:ServerContextRegisters 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:
registerPersistentSearchin interfaceServerContext
-
deregisterPersistentSearch
public void deregisterPersistentSearch()Description copied from interface:ServerContextDeregisters 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:
deregisterPersistentSearchin interfaceServerContext
-
allowNewPersistentSearch
public boolean allowNewPersistentSearch()Description copied from interface:ServerContextIndicates 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:
allowNewPersistentSearchin interfaceServerContext- Returns:
trueif a new persistent search is allowed orfalsef if not.
-
lockdownMode
public boolean lockdownMode()Description copied from interface:ServerContextIndicates 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:
lockdownModein interfaceServerContext- Returns:
trueif the Directory Server is currently configured to operate in the lockdown mode, orfalseif not.
-
setLockdownMode
public void setLockdownMode(boolean lockdownMode) Description copied from interface:ServerContextSpecifies whether the server should operate in lockdown mode.- Specified by:
setLockdownModein interfaceServerContext- Parameters:
lockdownMode- Indicates whether the Directory Server should operate in lockdown mode.
-
getComponentEntryDN
Description copied from interface:AlertGeneratorRetrieves the DN of the configuration entry with which this alert generator is associated.- Specified by:
getComponentEntryDNin interfaceAlertGenerator- Returns:
- The DN of the configuration entry with which this alert generator is associated.
-
getAlerts
Description copied from interface:AlertGeneratorRetrieves 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:
getAlertsin interfaceAlertGenerator- 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:
isShuttingDownin interfaceServerContext- Returns:
trueif this server is currently in the process of shutting down andfalseotherwise.
-
main
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
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
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:
uncaughtExceptionin interfaceServerContext- 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
Description copied from interface:ServerContextReturns the log aggregator.- Specified by:
getLogAggregatorin interfaceServerContext- Returns:
- the log aggregator
-
getEntry(Dn)when possible