Interface ServerContext
- All Known Implementing Classes:
DirectoryServer
public interface ServerContext
Context for the server, giving access to global properties of the server.
-
Method Summary
Modifier and TypeMethodDescriptionvoidconnectionClosed(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.voidderegisterDirectoryThread(DirectoryThread directoryThread) Deregister the provided directory thread into this context.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.voidDeregisters the provided virtual attribute rule with the Directory Server.booleanentryExists(Dn entryDN) Returns whether if the specified entry exists in one of the backends.AccessControlHandler<? extends AccessControlHandlerCfg> Returns the access control configuration manager registered with the Directory Server.getAccountStatusNotificationHandler(Dn handlerDN) Returns The requested account status notification handler, ornullif no such handler is defined in the server.longReturns The number of admin connections that are currently established on the Administration Connector.List<AlertHandler<?>> Returns The alert handlers that have been registered with the Directory Server.Returns The authenticated users manager for the Directory Server.Returns an unmodifiable collection containing all the authentication policies registered with the Directory Server.getAuthenticationPolicy(Dn configEntryDN) Returns The requested authentication policy, ornullif there is no such policy.Returns The requested authentication password storage scheme, ornullif no such scheme is defined.Returns The 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) Returns The requested certificate mapper, ornullif there is no such certificate mapper registered with the server.Returns the common audit manager.Returns the configuration handler, which provides operations to the configuration.Returns The set of connection handlers configured in the Directory Server.Returns the manager of core configuration.Returns the Crypto Manager for the instance.longReturns The number of client connections that are currently established.Returns The default password policy for the Directory Server.Returns all directory threads.Returns the Disk Space Monitoring service, for checking free disk space.Returns The entry with the requested DN, ornullif it does not exist.EntryCache<?> Returns The entry cache for the Directory Server.Returns The read-only environment configuration for the Directory Server.Returns The handler for the specified extended operation's OID, ornullif there is none.Returns The Directory Server group manager.Returns theHealthCheckerthat aggregates all theHealthStatusProviderfor diagnosing the global server health.org.forgerock.http.routing.RouterReturns the HTTP request router.List<IdentityMapper<?>> getIdentityMappers(Collection<Dn> configEntriesDNs) Returns The list of requested identity mappers, or an empty list if the provided entries DNs are not associated with any active identity mappers.Returns The JMX MBeans that are associated with the server.Returns The JMX MBean server that is associated with the Directory Server.getKeyManagerProvider(Dn keyManagerProviderDN) Returns the key manager provider matching the provided DN, ornullif none match.Returns the current process ID of this server.Returns the lock manager which will be used for coordinating access to LDAP entries.Returns the log aggregator.Returns the logger config manager.Returns The mail servers manager for this Directory Server.longReturns 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.Returns The 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.io.opentelemetry.api.OpenTelemetryReturns theOpenTelemetryobject.getParentEntry(Dn childDn) Retrieves the entry that is the immediate parent of the entry having the provided DN.getPasswordGenerator(Dn configEntryDN) Returns The requested password generator, ornullif no such generator is defined.getPasswordStorageScheme(String lowerName) Returns The requested password storage scheme, ornullif no such scheme is defined.getPasswordStorageScheme(Dn configEntryDN) Returns The requested password storage scheme, ornullif no such scheme is defined.Returns The password storage schemes defined in the Directory Server.PasswordValidator<? extends PasswordValidatorCfg> getPasswordValidator(Dn configEntryDN) Returns The requested password validator, ornullif no such validator is defined.Returns A reference to the Directory Server plugin configuration manager.List<IdentityMapper<?>> 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.getRetentionPolicy(Dn configEntryDN) Returns The requested retention policy, ornullif there is no such policy.Returns the root configuration object.org.opends.server.protocols.internal.InternalClientConnectionReturns a shared internal client connection that is authenticated as a root user.getRotationPolicy(Dn configEntryDN) Returns The requested rotation policy, ornullif there is no such policy.Returns The handler for the specified SASL mechanism, ornullif there is none.Returns the scheduler.Returns the schema of the server.Returns the schema handler, which provides operations to the schema.Returns the server management context, which gives an entry point on configuration objects.Returns the paths of the server install/instance.Returns the Service Discovery Mechanism Config Manager.Returns The time when the Directory Server was started.Returns the original stdout at the time the process started, before its redefinition by DJ.Returns The Directory Server subentry manager.Returns The supported controls registered with the Directory Server.Returns The set of extended operations that may be processed by the Directory Server.Returns The set of supported features registered with the Directory Server.Returns The supported LDAP versions for the Directory Server.Returns The set of SASL mechanisms that are supported by the Directory Server.Returns The set of synchronization providers that have been registered with the Directory Server.Returns the topology this server participates in.longReturns 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, ornullif none match.Returns The set of virtual attribute rules registered with the Directory Server.getVirtualAttributes(Entry entry) Returns The virtual attribute rules registered with the Directory Server that are applicable to the given entry. It may be an empty list if there are no applicable virtual attribute rules.WorkQueue<?> Returns A reference to the Directory Server work queue.voidhandleRequest(RequestContext context, Request request, Consumer<Response> responseWriter) Routes an LDAP request to the appropriate backend(s) for processing.booleanReturnstrueif the server is at least starting.booleanReturnstrueif the server is currently offline (i.e. a tool is being run instead).booleanReturns whether the server is currently running.booleanReturnstrueif the server is currently in the process of shutting down.Class<?> Loads the named class using this directory server application's class loader.booleanReturns whether the Directory Server is currently configured to operate in the lockdown mode.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) 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.voidregisterDirectoryThread(DirectoryThread directoryThread) Registers the provided directory thread into this context.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.booleanRegisters 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.voidRegisters the provided virtual attribute rule with the Directory Server.voidrejectNewConnectionIfNeeded(InetAddress remoteAddress, boolean isAdminConnector) Throws aDisconnectExceptionif the client with the provided remote address should be disconnected immediately.voidrequestCompleted(ClientConnection clientConnection) Signals that a request has completed processing.voidResets the default password policy to null.voidrestart(String className, LocalizableMessage reason) Causes the Directory Server to perform an in-core restart.default voidsendAlertNotification(AlertGenerator generator, String alertType, LocalizableMessage alertMessage) Sends an alert notification with the provided information.voidsendAlertNotification(AlertGenerator generator, Severity severity, String alertType, LocalizableMessage alertMessage) Sends an alert notification with the provided information.voidsetLockdownMode(boolean lockdownMode) Specifies whether the server should operate in lockdown mode.voidsetOpenTelemetry(io.opentelemetry.api.OpenTelemetry openTelemetry) Sets theOpenTelemetryobject that the directory server must use for telemetry functionality.voidshutDown(String className, LocalizableMessage reason, boolean toolShutdown) Shuts down the Directory Server.booleantryAcceptRequest(ClientConnection clientConnection) Attempts to accept a new request for processing, unless the server is busy, in which case the method will wait until sufficient active requests have completed, before eventuallyfalseif the wait times out.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.
-
Method Details
-
getServerPaths
ServerPaths getServerPaths()Returns the paths of the server install/instance.- Returns:
- the paths of the server install/instance
-
getSchema
Schema getSchema()Returns 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.- Returns:
- the schema of the server
-
getSchemaHandler
SchemaHandler getSchemaHandler()Returns the schema handler, which provides operations to the schema.- Returns:
- the schema handler, which provides operations to the schema
-
getConfigurationHandler
ConfigurationHandler getConfigurationHandler()Returns the configuration handler, which provides operations to the configuration.- Returns:
- the configuration handler, which provides operations to the configuration
-
getServerManagementContext
ServerManagementContext getServerManagementContext()Returns the server management context, which gives an entry point on configuration objects.- Returns:
- the server management context, which gives an entry point on configuration objects
-
getRootConfig
RootCfg getRootConfig()Returns the root configuration object.Equivalent to calling
getServerManagementContext().getRootConfiguration().- Returns:
- the root configuration object
-
getRootConnection
org.opends.server.protocols.internal.InternalClientConnection getRootConnection()Returns a shared internal client connection that is authenticated as a root user.- Returns:
- a shared internal client connection that is authenticated as a root user
-
handleRequest
void handleRequest(RequestContext context, Request request, Consumer<Response> responseWriter) throws LdapException Routes an LDAP request to the appropriate backend(s) for processing.- 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
MemoryQuota getMemoryQuota()Returns the memory quota system for reserving long term memory.- Returns:
- the memory quota system for reserving long term memory
-
getDiskSpaceMonitor
DiskSpaceMonitor getDiskSpaceMonitor()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.- Returns:
- the Disk Space Monitoring service, for checking free disk space
-
getHttpRouter
org.forgerock.http.routing.Router getHttpRouter()Returns the HTTP request router.- Returns:
- the HTTP request router
-
getCommonAudit
-
getServiceDiscoveryMechanismConfigManager
ServiceDiscoveryMechanismConfigManager getServiceDiscoveryMechanismConfigManager()Returns the Service Discovery Mechanism Config Manager.- Returns:
- the Service Discovery Mechanism Config Manager
-
getLoggerConfigManager
LoggerConfigManager getLoggerConfigManager()Returns the logger config manager.- Returns:
- the logger config manager
-
getCryptoManager
CryptoManager getCryptoManager()Returns the Crypto Manager for the instance.- Returns:
- the Crypto Manager for the instance
-
getScheduler
-
getLockManager
LockManager getLockManager()Returns the lock manager which will be used for coordinating access to LDAP entries.- Returns:
- the lock manager which will be used for coordinating access to LDAP entries
-
getBackendConfigManager
BackendConfigManager getBackendConfigManager()Returns the manager of backends.- Returns:
- the manager of backends
-
getCoreConfigManager
CoreConfigManager getCoreConfigManager()Returns the manager of core configuration.- Returns:
- the manager of core configuration
-
getKeyManagerProvider
Returns the key manager provider matching the provided DN, ornullif none match.- Parameters:
keyManagerProviderDN- the DN of the key manager provider- Returns:
- the key manager provider matching the provided DN, or
nullif none match
-
getTrustManagerProvider
Returns the trust manager provider matching the provided DN, ornullif none match.- Parameters:
trustManagerProviderDN- the DN of the trust manager provider- Returns:
- the trust manager provider matching the provided DN, or
nullif none match
-
getMeterRegistry
MeterRegistry getMeterRegistry()Returns the globalMeterRegistrythat contains all metrics for all monitor providers.- Returns:
- the global
MeterRegistrythat contains all metrics for all monitor providers
-
getOpenTelemetry
io.opentelemetry.api.OpenTelemetry getOpenTelemetry()Returns theOpenTelemetryobject. This is the entrypoint to telemetry functionality for tracing, metrics (but DS does not use this capability today) and baggage.- Returns:
- the
OpenTelemetryobject
-
registerDirectoryThread
Registers the provided directory thread into this context.- Parameters:
directoryThread- The directory thread to register
-
getDirectoryThreads
Collection<DirectoryThread> getDirectoryThreads()Returns all directory threads.- Returns:
- all the directory threads.
-
deregisterDirectoryThread
Deregister the provided directory thread into this context.- Parameters:
directoryThread- The directory thread to deregister
-
setOpenTelemetry
void setOpenTelemetry(io.opentelemetry.api.OpenTelemetry openTelemetry) Sets theOpenTelemetryobject that the directory server must use for telemetry functionality.- Parameters:
openTelemetry- theOpenTelemetryobject- See Also:
-
getCurrentConnections
long getCurrentConnections()Returns The number of client connections that are currently established.- Returns:
- The number of client connections that are currently established
-
getAdminConnectorConnections
long getAdminConnectorConnections()Returns The number of admin connections that are currently established on the Administration Connector.- Returns:
- The number of admin connections that are currently established on the Administration Connector
-
getMaxConnections
long getMaxConnections()Returns The maximum number of client connections that have been established concurrently.- Returns:
- The maximum number of client connections that have been established concurrently
-
getStartTime
GeneralizedTime getStartTime()Returns The time when the Directory Server was started.- Returns:
- The time when the Directory Server was started
-
getTotalConnections
long getTotalConnections()Returns The total number of client connections that have been established since the Directory Server started.- Returns:
- The total number of client connections that have been established since the Directory Server started
-
getHealthChecker
HealthChecker getHealthChecker()Returns theHealthCheckerthat aggregates all theHealthStatusProviderfor diagnosing the global server health.- Returns:
- The health-checker for diagnosing the global server health.
-
getStdoutAtProcessStart
PrintStream getStdoutAtProcessStart()Returns the original stdout at the time the process started, before its redefinition by DJ.- Returns:
- the original stdout at the time the process started, before its redefinition by DJ
-
registerBackupStorageProvider
Registers a backup storage provider.- Parameters:
backupStorageProvider- The backup storage provider to register with the Directory Server.
-
deregisterBackupStorageProvider
Deregisters a backup storage provider.- Parameters:
backupStorageProvider- The backup storage provider to deregister from the Directory Server.
-
getBackupStorageProvider
Returns The backup storage provider that supports the given storage scheme ornullif no such storage provider hase been found.- 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
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.- Parameters:
monitorProvider- The monitor provider to register with the Directory Server.
-
deregisterMonitorProvider
Deregisters the specified monitor provider from the Directory Server. If no such monitor provider is registered, no action will be taken.- Parameters:
monitorProvider- The monitor provider to deregister from the Directory Server.
-
getAuthenticatedUsers
ClientConnection.AuthenticatedUsers getAuthenticatedUsers()Returns The authenticated users manager for the Directory Server.- Returns:
- The authenticated users manager for the Directory Server
-
getMailServerManager
MailServerConfigManager getMailServerManager()Returns The mail servers manager for this Directory Server.- Returns:
- The mail servers manager for this Directory Server
-
getGroupManager
GroupManager getGroupManager()Returns The Directory Server group manager.- Returns:
- The Directory Server group manager
-
getSubentryManager
SubentryManager getSubentryManager()Returns The Directory Server subentry manager.- Returns:
- The Directory Server subentry manager
-
getPluginConfigManager
PluginConfigManager getPluginConfigManager()Returns A reference to the Directory Server plugin configuration manager.- Returns:
- A reference to the Directory Server plugin configuration manager
-
registerInternalPlugin
Registers the provided internal plugin with the Directory Server and ensures that it will be invoked in the specified ways.- 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
Deregisters the provided internal plugin with the Directory Server.- Parameters:
plugin- The internal plugin to deregister from the Directory Server.
-
getVirtualAttributes
Collection<VirtualAttributeRule> getVirtualAttributes()Returns The set of virtual attribute rules registered with the Directory Server.- Returns:
- The set of virtual attribute rules registered with the Directory Server
-
getVirtualAttributes
Returns The virtual attribute rules registered with the Directory Server that are applicable to the given entry. It may be an empty list if there are no applicable virtual attribute rules.- Parameters:
entry- The entry for which to retrieve the applicable virtual attribute rules.- Returns:
- The virtual attribute rules registered with the Directory Server that are applicable to the given entry. It may be an empty list if there are no applicable virtual attribute rules
-
registerVirtualAttribute
Registers the provided virtual attribute rule with the Directory Server.- Parameters:
rule- The virtual attribute rule to be registered.
-
deregisterVirtualAttribute
Deregisters the provided virtual attribute rule with the Directory Server.- Parameters:
rule- The virtual attribute rule to be deregistered.
-
getJMXMBeanServer
MBeanServer getJMXMBeanServer()Returns The JMX MBean server that is associated with the Directory Server.- Returns:
- The JMX MBean server that is associated with the Directory Server
-
getJMXMBeans
Collection<JMXMBean> getJMXMBeans()Returns The JMX MBeans that are associated with the server.- Returns:
- The JMX MBeans that are associated with the server
-
registerAlertGenerator
Registers the provided alert generator with the Directory Server.- Parameters:
alertGenerator- The alert generator to register.
-
deregisterAlertGenerator
Deregisters the provided alert generator with the Directory Server.- Parameters:
alertGenerator- The alert generator to deregister.
-
getAlertHandlers
List<AlertHandler<?>> getAlertHandlers()Returns The alert handlers that have been registered with the Directory Server.- Returns:
- The alert handlers that have been registered with the Directory Server
-
registerAlertHandler
Registers the provided alert handler with the Directory Server.- Parameters:
alertHandler- The alert handler to register.
-
deregisterAlertHandler
Deregisters the provided alert handler with the Directory Server.- Parameters:
alertHandler- The alert handler to deregister.
-
sendAlertNotification
default void sendAlertNotification(AlertGenerator generator, String alertType, LocalizableMessage alertMessage) Sends an alert notification with the provided information.- Parameters:
generator- The alert generator that created the alert.alertType- The alert type name for this alert.alertMessage- A message (possiblynull) that can
-
sendAlertNotification
void sendAlertNotification(AlertGenerator generator, Severity severity, String alertType, LocalizableMessage alertMessage) Sends an alert notification with the provided information.- 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
Returns The requested password storage scheme, ornullif no such scheme is defined.- 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
Collection<PasswordStorageScheme<?>> getPasswordStorageSchemes()Returns The password storage schemes defined in the Directory Server.- Returns:
- The password storage schemes defined in the Directory Server
-
getPasswordStorageScheme
Returns The requested password storage scheme, ornullif no such scheme is defined.- 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
ConcurrentMap<String, PasswordStorageScheme<?>> getAuthPasswordStorageSchemes()Returns The authentication password storage schemes defined in the Directory Server, as a mapping between the scheme name and the corresponding implementation..- Returns:
- The authentication password storage schemes defined in the Directory Server, as a mapping between the scheme name and the corresponding implementation
-
getAuthPasswordStorageScheme
Returns The requested authentication password storage scheme, ornullif no such scheme is defined.- 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
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.- 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
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.- Parameters:
configEntryDN- The DN of the configuration entry that defines the password storage scheme.
-
getPasswordValidator
Returns The requested password validator, ornullif no such validator is defined.- 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
void registerPasswordValidator(Dn configEntryDN, PasswordValidator<? extends PasswordValidatorCfg> validator) Registers the provided password validator for use with the Directory Server.- 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
Deregisters the provided password validator for use with the Directory Server.- Parameters:
configEntryDN- The DN of the configuration entry that defines the password validator to deregister.
-
getAccountStatusNotificationHandler
Returns The requested account status notification handler, ornullif no such handler is defined in the server.- 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
-
getAccessControlHandler
AccessControlHandler<? extends AccessControlHandlerCfg> getAccessControlHandler()Returns the access control configuration manager registered with the Directory Server.- Returns:
- the access control configuration manager registered with the Directory Server
-
registerAccountStatusNotificationHandler
void registerAccountStatusNotificationHandler(Dn handlerDN, AccountStatusNotificationHandler<?> handler) Registers the provided account status notification handler with the Directory Server.- 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
Deregisters the specified account status notification handler with the Directory Server.- Parameters:
handlerDN- The DN of the configuration entry for the account status notification handler to deregister.
-
getPasswordGenerator
Returns The requested password generator, ornullif no such generator is defined.- 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
Registers the provided password generator for use with the Directory Server.- 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
Deregisters the provided password generator for use with the Directory Server.- Parameters:
configEntryDN- The DN of the configuration entry that defines the password generator to deregister.
-
getAuthenticationPolicies
Collection<AuthenticationPolicy> getAuthenticationPolicies()Returns an unmodifiable collection containing all 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.- Returns:
- an unmodifiable collection containing all the authentication policies registered with the Directory Server
-
getAuthenticationPolicy
Returns The requested authentication policy, ornullif there is no such policy.- Parameters:
configEntryDN- The DN of the configuration entry for which to retrieve the associated authentication policy- Returns:
- The requested authentication policy, or
nullif there is no such policy
-
registerAuthenticationPolicy
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.- Parameters:
policy- The authentication policy to register with the server.
-
deregisterAuthenticationPolicy
Deregisters the provided authentication policy with the Directory Server. If no such policy is registered, then no action will be taken.- Parameters:
configEntryDN- The DN of the configuration entry that defines the authentication policy to deregister.
-
resetDefaultPasswordPolicy
void resetDefaultPasswordPolicy()Resets the default password policy to null. -
getDefaultPasswordPolicy
PasswordPolicy getDefaultPasswordPolicy()Returns The default password policy for the Directory Server. This method is equivalent to invokinggetAuthenticationPolicyon the DN returned fromDirectoryServer.getDefaultPasswordPolicyDN().- Returns:
- The default password policy for the Directory Server
-
getRotationPolicy
Returns The requested rotation policy, ornullif there is no such policy.- Parameters:
configEntryDN- The DN of the configuration entry for which to retrieve the associated rotation policy.- Returns:
- The requested rotation policy, or
nullif there is no such policy
-
registerRotationPolicy
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.- Parameters:
configEntryDN- The DN of the configuration entry that defines the password policy.policy- The rotation policy to register with the server.
-
deregisterRotationPolicy
Deregisters the provided log rotation policy with the Directory Server. If no such policy is registered, then no action will be taken.- Parameters:
configEntryDN- The DN of the configuration entry that defines the rotation policy to deregister.
-
getRetentionPolicy
Returns The requested retention policy, ornullif there is no such policy.- Parameters:
configEntryDN- The DN of the configuration entry for which to retrieve the associated retention policy.- Returns:
- The requested retention policy, or
nullif there is no such policy
-
registerRetentionPolicy
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.- Parameters:
configEntryDN- The DN of the configuration entry that defines the password policy.policy- The retention policy to register with the server.
-
deregisterRetentionPolicy
Deregisters the provided log retention policy with the Directory Server. If no such policy is registered, then no action will be taken.- Parameters:
configEntryDN- The DN of the configuration entry that defines the retention policy to deregister.
-
getMonitorProviders
ConcurrentMap<Dn, MonitorProvider> getMonitorProviders()Returns The 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..- Returns:
- The 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
-
getEntryCache
EntryCache<?> getEntryCache()Returns The entry cache for the Directory Server.- Returns:
- The entry cache for the Directory Server
-
getCertificateMapper
Returns The requested certificate mapper, ornullif there is no such certificate mapper registered with the server.- Parameters:
mapperDN- The DN with which the certificate mapper is registered.- Returns:
- The requested certificate mapper, or
nullif there is no such certificate mapper registered with the server
-
registerCertificateMapper
Registers the provided certificate mapper with the Directory Server.- Parameters:
mapperDN- The DN with which to register the certificate mapper.mapper- The certificate mapper to register with the server.
-
deregisterCertificateMapper
Deregisters the specified certificate mapper with the Directory Server.- Parameters:
mapperDN- The DN with which the certificate mapper is registered.
-
getParentEntry
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.- 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
Returns The entry with the requested DN, ornullif it does not exist. 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.- Parameters:
entryDN- The DN of the entry to retrieve.- Returns:
- The entry with the requested DN, or
nullif it does not exist - Throws:
LdapException- If a problem occurs while attempting to retrieve the entry.
-
entryExists
Returns whether if the specified entry exists in one of the backends. The caller is not required to hold any locks when invoking this method.- Parameters:
entryDN- The DN of the entry for which to make the determination.- Returns:
- whether if the specified entry exists in one of the backends
- Throws:
LdapException- If a problem occurs while attempting to make the determination.
-
getSupportedControls
-
registerSupportedControl
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.- Parameters:
controlOID- The OID of the control to register as a supported control.
-
deregisterSupportedControl
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.- Parameters:
controlOID- The OID of the control to deregister as a supported control.
-
getSupportedFeatures
-
registerSupportedFeature
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.- Parameters:
featureOID- The OID of the feature to register as a supported feature.
-
deregisterSupportedFeature
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.- Parameters:
featureOID- The OID of the feature to deregister as a supported feature.
-
getSupportedExtensions
-
getExtendedOperationHandler
Returns The handler for the specified extended operation's OID, ornullif there is none.- Parameters:
oid- The OID of the extended operation to retrieve.- Returns:
- The handler for the specified extended operation's OID, or
nullif there is none
-
registerSupportedExtension
Registers the provided extended operation handler with the Directory Server.- Parameters:
oid- The OID for the extended operation to register.handler- The extended operation handler to register with the Directory Server.
-
deregisterSupportedExtension
Deregisters the provided extended operation handler with the Directory Server.- Parameters:
oid- The OID for the extended operation to deregister.
-
getSupportedSASLMechanisms
-
getSASLMechanismHandler
Returns The handler for the specified SASL mechanism, ornullif there is none.- Parameters:
name- The name of the SASL mechanism to retrieve.- Returns:
- The handler for the specified SASL mechanism, or
nullif there is none
-
registerSASLMechanismHandler
Registers the provided SASL mechanism handler with the Directory Server.- Parameters:
name- The name of the SASL mechanism to be registered.handler- The SASL mechanism handler to register with the Directory Server.
-
deregisterSASLMechanismHandler
Deregisters the provided SASL mechanism handler with the Directory Server.- Parameters:
name- The name of the SASL mechanism to be deregistered.
-
getSupportedLDAPVersions
-
registerSupportedLDAPVersion
Registers the provided LDAP protocol version as supported within the Directory Server.- 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
void deregisterSupportedLDAPVersion(int supportedLDAPVersion, ConnectionHandler<?> connectionHandler) Deregisters the provided LDAP protocol version as supported within the Directory Server.- Parameters:
supportedLDAPVersion- The LDAP protocol version to deregister.connectionHandler- The connection handler that no longer supports the provided LDAP version.
-
getIdentityMappers
Returns The list of requested identity mappers, or an empty list if the provided entries DNs are not associated with any active identity mappers..- Parameters:
configEntriesDNs- The list of DNs of the configuration entries for the identity mappers to retrieve.- Returns:
- The list of requested identity mappers, or an empty list if the provided entries DNs are not associated with any active identity mappers
-
registerIdentityMapper
Registers the provided identity mapper for use with the Directory Server.- Parameters:
configEntryDN- The DN of the configuration entry in which the identity mapper definition resides.identityMapper- The identity mapper to be registered.
-
deregisterIdentityMapper
Deregisters the provided identity mapper for use with the Directory Server.- Parameters:
configEntryDN- The DN of the configuration entry in which the identity mapper definition resides.
-
getProxiedAuthorizationIdentityMappers
List<IdentityMapper<?>> getProxiedAuthorizationIdentityMappers()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..- 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
List<ConnectionHandler<?>> getConnectionHandlers()Returns The set of connection handlers configured in the Directory Server. The returned list must not be altered.- Returns:
- The set of connection handlers configured in the Directory Server
-
registerConnectionHandler
Registers the provided connection handler with the Directory Server.- Parameters:
handler- The connection handler to register with the Directory Server.
-
deregisterConnectionHandler
Deregisters the provided connection handler with the Directory Server.- Parameters:
handler- The connection handler to deregister with the Directory Server.
-
getWorkQueue
WorkQueue<?> getWorkQueue()Returns A reference to the Directory Server work queue.- Returns:
- A reference to the Directory Server work queue
-
getSynchronizationProviders
Collection<SynchronizationProvider<? extends SynchronizationProviderCfg>> getSynchronizationProviders()Returns The set of synchronization providers that have been registered with the Directory Server.- Returns:
- The set of synchronization providers that have been registered with the Directory Server
-
registerBackupTaskListener
Registers the provided backup task listener with the Directory Server.- Parameters:
listener- The backup task listener to register with the Directory Server.
-
deregisterBackupTaskListener
Deregisters the provided backup task listener with the Directory Server.- 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.- 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.- Parameters:
backend- The backend in which the backup was performed.
-
registerRestoreTaskListener
Registers the provided restore task listener with the Directory Server.- Parameters:
listener- The restore task listener to register with the Directory Server.
-
deregisterRestoreTaskListener
Deregisters the provided restore task listener with the Directory Server.- 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.- 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.- Parameters:
backend- The backend in which the restore was performed.
-
registerExportTaskListener
Registers the provided LDIF export task listener with the Directory Server.- Parameters:
listener- The export task listener to register with the Directory Server.
-
deregisterExportTaskListener
Deregisters the provided LDIF export task listener with the Directory Server.- 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.- 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.- 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.- Parameters:
listener- The import task listener to register with the Directory Server.
-
deregisterImportTaskListener
Deregisters the provided LDIF import task listener with the Directory Server.- 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.- 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.- Parameters:
backend- The backend in which the import was performed.config- The configuration for the import that was performed.
-
registerShutdownListener
Registers the provided shutdown listener with the Directory Server so that it will be notified when the server shuts down.- Parameters:
listener- The shutdown listener to register with the Directory Server.
-
deregisterShutdownListener
Deregisters the provided shutdown listener with the Directory Server.- Parameters:
listener- The shutdown listener to deregister with the Directory Server.
-
shutDown
Shuts down the Directory Server.- Parameters:
className- the class of the component that initiated the shutdownreason- the reason for the shutdowntoolShutdown-trueif the shutdown is initiated by a tool
-
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.
-
rejectNewConnectionIfNeeded
void rejectNewConnectionIfNeeded(InetAddress remoteAddress, boolean isAdminConnector) throws DisconnectException Throws aDisconnectExceptionif the client with the provided remote address should be disconnected immediately. This method must be called beforenewConnectionAccepted(ClientConnection).- 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
Indicates that a new connection has been accepted, increments the associated metrics and assigns a connection ID. This method must be called afterrejectNewConnectionIfNeeded(InetAddress, boolean).- Parameters:
clientConnection- The client connection that has been established.- Returns:
- The connection ID that should be used for this connection.
-
connectionClosed
Indicates that the specified client connection has been closed.- Parameters:
clientConnection- The client connection that has been closed.
-
tryAcceptRequest
Attempts to accept a new request for processing, unless the server is busy, in which case the method will wait until sufficient active requests have completed, before eventuallyfalseif the wait times out. If this method returnstrue, then the request has been accepted andrequestCompleted(ClientConnection)must be called once the request has been processed.- Parameters:
clientConnection- The client connection that received the request.- Returns:
trueif a new request can be accepted, orfalseif the server is too busy.
-
requestCompleted
Signals that a request has completed processing.- Parameters:
clientConnection- The client connection that received the request.
-
registerPersistentSearch
boolean registerPersistentSearch()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.- Returns:
- whether a new persistent search is allowed and registered.
-
deregisterPersistentSearch
void deregisterPersistentSearch()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. -
lockdownMode
boolean lockdownMode()Returns whether the Directory Server is currently configured to operate in the lockdown mode. In the lockdown mode all non-root requests will be rejected and all connection attempts from non-loopback clients will be rejected.- Returns:
- whether the Directory Server is currently configured to operate in the lockdown mode
-
setLockdownMode
void setLockdownMode(boolean lockdownMode) Specifies whether the server should operate in lockdown mode.- Parameters:
lockdownMode- Indicates whether the Directory Server should operate in lockdown mode.
-
getLocalProcessId
ProcessId getLocalProcessId()Returns the current process ID of this server.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.
- Returns:
- the current process ID of this server
-
getTopology
Topology getTopology()Returns the topology this server participates in.- Returns:
- the topology this server participates in
-
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:
className- 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:
-
isOffline
boolean isOffline()Returnstrueif the server is currently offline (i.e. a tool is being run instead).- Returns:
trueif the server is currently offline (i.e. a tool is being run instead)
-
isRunning
boolean isRunning()Returns whether the server is currently running.- Returns:
- whether the server is currently running
-
isShuttingDown
boolean isShuttingDown()Returnstrueif the server is currently in the process of shutting down.- Returns:
trueif the server is currently in the process of shutting down
-
isAtLeastStarting
boolean isAtLeastStarting()Returnstrueif the server is at least starting.- Returns:
trueif the server is at least starting
-
getEnvironmentConfig
DirectoryEnvironmentConfig getEnvironmentConfig()Returns The read-only environment configuration for the Directory Server.- Returns:
- The read-only environment configuration for the Directory Server
-
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.- 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
-