Package org.opends.server.core
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 TypeMethodDescriptionboolean
Indicates whether a new persistent search is allowed.void
connectionClosed
(ClientConnection clientConnection) Indicates that the specified client connection has been closed.void
deregisterAccountStatusNotificationHandler
(Dn handlerDN) Deregisters the specified account status notification handler with the Directory Server.void
deregisterAlertGenerator
(AlertGenerator alertGenerator) Deregisters the provided alert generator with the Directory Server.void
deregisterAlertHandler
(AlertHandler<?> alertHandler) Deregisters the provided alert handler with the Directory Server.void
deregisterAuthenticationPolicy
(Dn configEntryDN) Deregisters the provided authentication policy with the Directory Server.void
deregisterBackupStorageProvider
(BackupStorageProvider backupStorageProvider) Deregisters a backup storage provider.void
Deregisters the provided backup task listener with the Directory Server.void
deregisterCertificateMapper
(Dn mapperDN) Deregisters the specified certificate mapper with the Directory Server.void
deregisterConnectionHandler
(ConnectionHandler<?> handler) Deregisters the provided connection handler with the Directory Server.void
Deregisters the provided LDIF export task listener with the Directory Server.void
deregisterIdentityMapper
(Dn configEntryDN) Deregisters the provided identity mapper for use with the Directory Server.void
Deregisters the provided LDIF import task listener with the Directory Server.void
Deregisters the provided internal plugin with the Directory Server.void
deregisterMonitorProvider
(MonitorProvider monitorProvider) Deregisters the specified monitor provider from the Directory Server.void
deregisterPasswordGenerator
(Dn configEntryDN) Deregisters the provided password generator for use with the Directory Server.void
deregisterPasswordStorageScheme
(Dn configEntryDN) Deregisters the specified password storage scheme with the Directory Server.void
deregisterPasswordValidator
(Dn configEntryDN) Deregisters the provided password validator for use with the Directory Server.void
Deregisters a canceled persistent search.void
Deregisters the provided restore task listener with the Directory Server.void
deregisterRetentionPolicy
(Dn configEntryDN) Deregisters the provided log retention policy with the Directory Server.void
deregisterRotationPolicy
(Dn configEntryDN) Deregisters the provided log rotation policy with the Directory Server.void
Deregisters the provided SASL mechanism handler with the Directory Server.void
Deregisters the provided shutdown listener with the Directory Server.void
deregisterSupportedControl
(String controlOID) Deregisters the provided OID as a supported control for the Directory Server.void
Deregisters the provided extended operation handler with the Directory Server.void
deregisterSupportedFeature
(String featureOID) Deregisters the provided OID as a supported feature for the Directory Server.void
deregisterSupportedLDAPVersion
(int supportedLDAPVersion, ConnectionHandler<?> connectionHandler) Deregisters the provided LDAP protocol version as supported within the Directory Server.void
deregisterSynchronizationProvider
(SynchronizationProvider<?> provider) Deregisters the provided synchronization provider with the Directory Server.void
Deregisters the provided virtual attribute rule with the Directory Server.boolean
entryExists
(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.long
Retrieves 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 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 ornull
if 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.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.long
Retrieves 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 theHealthChecker
that aggregates all theHealthStatusProvider
for diagnosing the global server health.org.forgerock.http.routing.Router
Returns 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.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.long
Retrieves the maximum number of client connections that have been established concurrently.Returns the memory quota system for reserving long term memory.Returns the globalMeterRegistry
that 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 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.long
Retrieves 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.void
handleRequest
(RequestContext context, Request request, Consumer<ResponseStream> responseWriter) Routes an LDAP request to the appropriate backend(s) for processing.boolean
Returnstrue
if the server is at least starting.boolean
Returnstrue
if the server is currently offline (i.e.boolean
Indicates whether the server is currently running.boolean
Returnstrue
if the server is currently in the process of shutting down.boolean
isSupportedControl
(String controlOID) Indicates whether the specified OID is registered with the Directory Server as a supported control.boolean
Indicates whether the Directory Server is currently configured to operate in the lockdown mode, in which all non-root requests will be rejected and all connection attempts from non-loopback clients will be rejected.long
newConnectionAccepted
(ClientConnection clientConnection) Indicates that a new connection has been accepted, increments the associated metrics and assigns a connection ID.void
notifyBackupBeginning
(LocalBackend<?> backend) Notifies the registered backup task listeners that the server will be beginning a backup task with the provided information.void
notifyBackupEnded
(LocalBackend<?> backend) Notifies the registered backup task listeners that the server has completed processing on a backup task with the provided information.void
notifyExportBeginning
(LocalBackend<?> backend, LDIFExportConfig config) Notifies the registered LDIF export task listeners that the server will be beginning an export task with the provided information.void
notifyExportEnded
(LocalBackend<?> backend, LDIFExportConfig config, boolean successful) Notifies the registered LDIF export task listeners that the server has completed processing on an export task with the provided information.void
notifyImportBeginning
(LocalBackend<?> backend, LDIFImportConfig config) Notifies the registered LDIF import task listeners that the server will be beginning an import task with the provided information.void
notifyImportEnded
(LocalBackend<?> backend, LDIFImportConfig config, boolean successful) Notifies the registered LDIF import task listeners that the server has completed processing on an import task with the provided information.void
notifyRestoreBeginning
(LocalBackend<?> backend) Notifies the registered restore task listeners that the server will be beginning a restore task with the provided information.void
notifyRestoreEnded
(LocalBackend<?> backend) Notifies the registered restore task listeners that the server has completed processing on a restore task with the provided information.void
registerAccountStatusNotificationHandler
(Dn handlerDN, AccountStatusNotificationHandler<?> handler) Registers the provided account status notification handler with the Directory Server.void
registerAlertGenerator
(AlertGenerator alertGenerator) Registers the provided alert generator with the Directory Server.void
registerAlertHandler
(AlertHandler<?> alertHandler) Registers the provided alert handler with the Directory Server.void
Registers the provided authentication policy with the Directory Server.void
registerBackupStorageProvider
(BackupStorageProvider backupStorageProvider) Registers a backup storage provider.void
registerBackupTaskListener
(BackupTaskListener listener) Registers the provided backup task listener with the Directory Server.void
registerCertificateMapper
(Dn mapperDN, CertificateMapper<?> mapper) Registers the provided certificate mapper with the Directory Server.void
registerConnectionHandler
(ConnectionHandler<? extends ConnectionHandlerCfg> handler) Registers the provided connection handler with the Directory Server.void
registerExportTaskListener
(ExportTaskListener listener) Registers the provided LDIF export task listener with the Directory Server.void
registerIdentityMapper
(Dn configEntryDN, IdentityMapper<?> identityMapper) Registers the provided identity mapper for use with the Directory Server.void
registerImportTaskListener
(ImportTaskListener listener) Registers the provided LDIF import task listener with the Directory Server.void
Registers the provided internal plugin with the Directory Server and ensures that it will be invoked in the specified ways.void
registerMonitorProvider
(MonitorProvider monitorProvider) Registers the provided monitor provider with the Directory Server.void
registerPasswordGenerator
(Dn configEntryDN, PasswordGenerator<?> generator) Registers the provided password generator for use with the Directory Server.void
registerPasswordStorageScheme
(Dn configEntryDN, PasswordStorageScheme<?> scheme) Registers the provided password storage scheme with the Directory Server.void
registerPasswordValidator
(Dn configEntryDN, PasswordValidator<? extends PasswordValidatorCfg> validator) Registers the provided password validator for use with the Directory Server.void
Registers a new persistent search by increasing the count of active persistent searches.void
Registers the provided restore task listener with the Directory Server.void
registerRetentionPolicy
(Dn configEntryDN, RetentionPolicy<?> policy) Registers the provided log retention policy with the Directory Server.void
registerRotationPolicy
(Dn configEntryDN, RotationPolicy<?> policy) Registers the provided log rotation policy with the Directory Server.void
registerSASLMechanismHandler
(String name, SASLMechanismHandler<?> handler) Registers the provided SASL mechanism handler with the Directory Server.void
Registers the provided shutdown listener with the Directory Server so that it will be notified when the server shuts down.void
registerSupportedControl
(String controlOID) Registers the provided OID as a supported control for the Directory Server.void
registerSupportedExtension
(String oid, ExtendedOperationHandler<?> handler) Registers the provided extended operation handler with the Directory Server.void
registerSupportedFeature
(String featureOID) Registers the provided OID as a supported feature for the Directory Server.void
registerSupportedLDAPVersion
(int supportedLDAPVersion, ConnectionHandler<?> connectionHandler) Registers the provided LDAP protocol version as supported within the Directory Server.void
registerSynchronizationProvider
(SynchronizationProvider<? extends SynchronizationProviderCfg> provider) Registers the provided synchronization provider with the Directory Server.void
Registers the provided virtual attribute rule with the Directory Server.void
rejectNewConnectionIfNeeded
(InetAddress remoteAddress, boolean isAdminConnector) Throws aDisconnectException
if the client with the provided remote address should be disconnected immediately.void
Resets the default password policy to null.default void
sendAlertNotification
(AlertGenerator generator, String alertType, LocalizableMessage alertMessage) Sends an alert notification with the provided information.void
sendAlertNotification
(AlertGenerator generator, Severity severity, String alertType, LocalizableMessage alertMessage) Sends an alert notification with the provided information.void
setLockdownMode
(boolean lockdownMode) Specifies whether the server should operate in lockdown mode.void
uncaughtException
(Thread t, Throwable e, AlertGenerator alertGenerator) Provides a means of handling a case in which a thread is about to die because of an unhandled exception.
-
Method Details
-
getInstanceRoot
Path getInstanceRoot()Returns the directory of server instance.- Returns:
- the instance root directory
-
getServerRoot
Path getServerRoot()Returns the root directory of server.- Returns:
- the server root directory
-
getSchema
Schema getSchema()Returns the schema of the server.The schema is immutable. Any change on the schema must be done using a
SchemaHandler
which is available through thegetSchemaHandler()
method.- Returns:
- the schema
-
getSchemaHandler
SchemaHandler getSchemaHandler()Returns the schema handler, which provides operations to the schema.- Returns:
- the schema handler
-
getConfigurationHandler
ConfigurationHandler getConfigurationHandler()Returns the configuration handler, which provides operations to the configuration.- Returns:
- the configuration handler
-
getServerManagementContext
ServerManagementContext getServerManagementContext()Returns the server management context, which gives an entry point on configuration objects.- Returns:
- the server management context
-
getRootConfig
RootCfg getRootConfig()Returns the root configuration object.Equivalent to calling
getServerManagementContext().getRootConfiguration()
.- Returns:
- the root configuration object
-
getRootConnection
InternalClientConnection getRootConnection()Retrieves 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<ResponseStream> 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
-
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
-
getHttpRouter
org.forgerock.http.routing.Router getHttpRouter()Returns the HTTP request router.- Returns:
- the HTTP Router service
-
getCommonAudit
CommonAudit getCommonAudit()Returns the common audit manager.- Returns:
- the common audit manager
-
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
-
getCronExecutorService
ScheduledExecutorService getCronExecutorService()Returns the UNIX's cron-like executor service.- Returns:
- the UNIX's cron-like executor service
-
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:
- backend manager
-
getCoreConfigManager
CoreConfigManager getCoreConfigManager()Returns the manager of core configuration.- Returns:
- core configuration manager
-
getKeyManagerProvider
Returns the key manager provider matching the provided DN.- Parameters:
keyManagerProviderDN
- the DN of the key manager provider- Returns:
- the key manager provider, or
null
if none match
-
getTrustManagerProvider
Returns the trust manager provider matching the provided DN.- Parameters:
trustManagerProviderDN
- the DN of the trust manager provider- Returns:
- the trust manager provider, or
null
if none match
-
getMeterRegistry
MeterRegistry getMeterRegistry()Returns the globalMeterRegistry
that contains all metrics for all monitor providers.- Returns:
- The global
MeterRegistry
that contains all metrics for all monitor providers.
-
getCurrentConnections
long getCurrentConnections()Retrieves the number of client connections that are currently established.- Returns:
- The number of client connections that are currently established.
-
getAdminConnectorConnections
long getAdminConnectorConnections()Retrieves the number of connections that are currently established on the Administration Connector.- Returns:
- The number of admin connections that are currently established.
-
getMaxConnections
long getMaxConnections()Retrieves 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()Retrieves the time when the Directory Server was started.- Returns:
- The time when the Directory Server was started.
-
getTotalConnections
long getTotalConnections()Retrieves 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 theHealthChecker
that aggregates all theHealthStatusProvider
for 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 ornull
if no such storage provider hase been found.- Parameters:
storageScheme
- The storage scheme.- Returns:
- The backup storage provider that supports the given storage scheme or
null
if no such storage provider hase been found.
-
registerMonitorProvider
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
AuthenticatedUsers getAuthenticatedUsers()Retrieves the authenticated users manager for the Directory Server.- Returns:
- The authenticated users manager for the Directory Server.
-
getMailServerManager
MailServerConfigManager getMailServerManager()Retrieves the mail servers manager for the Directory Server.- Returns:
- The mail servers manager for this Directory Server.
-
getGroupManager
GroupManager getGroupManager()Retrieves the Directory Server group manager.- Returns:
- The Directory Server group manager.
-
getSubentryManager
SubentryManager getSubentryManager()Retrieves the Directory Server subentry manager.- Returns:
- The Directory Server subentry manager.
-
getPluginConfigManager
PluginConfigManager getPluginConfigManager()Retrieves 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()Retrieves the set of virtual attribute rules registered with the Directory Server.- Returns:
- The set of virtual attribute rules registered with the Directory Server.
-
getVirtualAttributes
Retrieves the set of virtual attribute rules registered with the Directory Server that are applicable to the provided entry.- 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
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()Retrieves a reference to 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()Retrieves the set of JMX MBeans that are associated with the server.- Returns:
- The set of 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()Retrieves the set of alert handlers that have been registered with the Directory Server.- Returns:
- The set of 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
Retrieves the password storage scheme defined in the specified configuration entry.- Parameters:
configEntryDN
- The DN of the configuration entry that defines the password storage scheme to retrieve.- Returns:
- The requested password storage scheme, or
null
if no such scheme is defined.
-
getPasswordStorageSchemes
Collection<PasswordStorageScheme<?>> getPasswordStorageSchemes()Retrieves the set of password storage schemes defined in the Directory Server, as a mapping between the all-lowercase scheme name and the corresponding implementation.- Returns:
- The set of password storage schemes defined in the Directory Server.
-
getPasswordStorageScheme
Retrieves the specified password storage scheme.- Parameters:
lowerName
- The name of the password storage scheme to retrieve, formatted in all lowercase characters.- Returns:
- The requested password storage scheme, or
null
if no such scheme is defined.
-
getAuthPasswordStorageSchemes
ConcurrentMap<String,PasswordStorageScheme<?>> getAuthPasswordStorageSchemes()Retrieves the set of authentication password storage schemes defined in the Directory Server, as a mapping between the scheme name and the corresponding implementation.- Returns:
- The set of authentication password storage schemes defined in the Directory Server.
-
getAuthPasswordStorageScheme
Retrieves the specified authentication password storage scheme.- Parameters:
name
- The case-sensitive name of the authentication password storage scheme to retrieve.- Returns:
- The requested authentication password storage scheme, or
null
if no such scheme is defined.
-
registerPasswordStorageScheme
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
Retrieves the password validator registered with the provided configuration entry DN.- Parameters:
configEntryDN
- The DN of the configuration entry for which to retrieve the associated password validator.- Returns:
- The requested password validator, or
null
if no such validator is defined.
-
registerPasswordValidator
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
Retrieves the account status notification handler with the specified configuration entry DN.- Parameters:
handlerDN
- The DN of the configuration entry associated with the account status notification handler to retrieve.- Returns:
- The requested account status notification handler, or
null
if no such handler is defined in the server.
-
registerAccountStatusNotificationHandler
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
Retrieves the password generator registered with the provided configuration entry DN.- Parameters:
configEntryDN
- The DN of the configuration entry for which to retrieve the associated password generator.- Returns:
- The requested password generator, or
null
if no such generator is defined.
-
registerPasswordGenerator
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 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.- Returns:
- The unmodifiable collection containing all of the authentication policies registered with the Directory Server.
-
getAuthenticationPolicy
Retrieves the authentication policy registered for the provided configuration entry.- Parameters:
configEntryDN
- The DN of the configuration entry for which to retrieve the associated authentication policy.- Returns:
- The authentication policy registered for the provided configuration entry, or
null
if there is no such policy.
-
registerAuthenticationPolicy
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()Retrieves the default password policy for the Directory Server. This method is equivalent to invokinggetAuthenticationPolicy
on the DN returned fromDirectoryServer.getDefaultPasswordPolicyDN()
.- Returns:
- The default password policy for the Directory Server.
-
getRotationPolicy
Retrieves the log rotation policy registered for the provided configuration entry.- Parameters:
configEntryDN
- The DN of the configuration entry for which to retrieve the associated rotation policy.- Returns:
- The rotation policy registered for the provided configuration entry, or
null
if there is no such policy.
-
registerRotationPolicy
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
Retrieves the log retention policy registered for the provided configuration entry.- Parameters:
configEntryDN
- The DN of the configuration entry for which to retrieve the associated retention policy.- Returns:
- The retention policy registered for the provided configuration entry, or
null
if there is no such policy.
-
registerRetentionPolicy
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()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.- Returns:
- The set of monitor providers that have been registered with the Directory Server.
-
getEntryCache
EntryCache<?> getEntryCache()Retrieves the entry cache for the Directory Server.- Returns:
- The entry cache for the Directory Server.
-
getCertificateMapper
Retrieves the certificate mapper registered with the provided entry DN.- Parameters:
mapperDN
- The DN with which the certificate mapper is registered.- Returns:
- The certificate mapper registered with the provided entry DN, or
null
if there is no such certificate mapper registered with the server.
-
registerCertificateMapper
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
null
if the provided DN does not have a parent (either because there is only a single RDN component or because this DN is a suffix defined in the server). - Throws:
LdapException
- If a problem occurs while attempting to retrieve the entry.
-
getEntry
Retrieves the entry with the requested DN. It will first determine which backend should be used for this DN and will then use that backend to retrieve the entry. The caller is not required to hold any locks on the specified DN.- Parameters:
entryDN
- The DN of the entry to retrieve.- Returns:
- The requested entry, or
null
if it does not exist. - Throws:
LdapException
- If a problem occurs while attempting to retrieve the entry.
-
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).- Parameters:
entryDN
- The DN of the configuration entry to retrieve.- Returns:
- The requested entry from the Directory Server configuration.
-
entryExists
Indicates whether the specified entry exists in the Directory Server. 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:
true
if the specified entry exists in one of the backends, orfalse
if it does not.- Throws:
LdapException
- If a problem occurs while attempting to make the determination.
-
getSupportedControls
Retrieves the set of supported controls registered with the Directory Server.- Returns:
- The set of supported controls registered with the Directory Server.
-
isSupportedControl
Indicates whether the specified OID is registered with the Directory Server as a supported control.- 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
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
Retrieves the set of supported features registered with the Directory Server.- Returns:
- The set of supported features registered with the Directory Server.
-
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
Retrieves the set of extended operations that may be processed by the Directory Server.- Returns:
- The set of extended operations that may be processed by the Directory Server.
-
getExtendedOperationHandler
Retrieves the handler for the extended operation for the provided OID.- Parameters:
oid
- The OID of the extended operation to retrieve.- Returns:
- The handler for the specified extended operation, or
null
if there is none.
-
registerSupportedExtension
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
Retrieves the set of SASL mechanisms that are supported by the Directory Server.- Returns:
- The set of SASL mechanisms that are supported by the Directory Server.
-
getSASLMechanismHandler
Retrieves the handler for the specified SASL mechanism.- Parameters:
name
- The name of the SASL mechanism to retrieve.- Returns:
- The handler for the specified SASL mechanism, or
null
if there is none.
-
registerSASLMechanismHandler
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
Retrieves the supported LDAP versions for the Directory Server.- Returns:
- The supported LDAP versions for the Directory Server.
-
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.
-
getIdentityMapper
Retrieves the Directory Server identity mapper whose configuration resides in the specified configuration entry.- Parameters:
configEntryDN
- The DN of the configuration entry for the identity mapper to retrieve.- Returns:
- The requested identity mapper, or
null
if the provided entry DN is not associated with an active identity mapper.
-
getIdentityMappers
Retrieves the Directory Server identity mappers whose configurations reside in the specified configuration entries.- 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
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()Retrieves the identity mappers that should be used to resolve authorization IDs contained in proxied authorization V2 controls.- 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()Retrieves 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()Retrieves a reference to the Directory Server work queue.- Returns:
- A reference to the Directory Server work queue.
-
getSynchronizationProviders
List<SynchronizationProvider<? extends SynchronizationProviderCfg>> getSynchronizationProviders()Retrieves 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.
-
registerSynchronizationProvider
void registerSynchronizationProvider(SynchronizationProvider<? extends SynchronizationProviderCfg> provider) Registers the provided synchronization provider with the Directory Server.- Parameters:
provider
- The synchronization provider to register.
-
deregisterSynchronizationProvider
Deregisters the provided synchronization provider with the Directory Server.- Parameters:
provider
- The synchronization provider to deregister.
-
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.successful
- Indicates whether the import completed successfully.
-
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.
-
rejectNewConnectionIfNeeded
void rejectNewConnectionIfNeeded(InetAddress remoteAddress, boolean isAdminConnector) throws DisconnectException Throws aDisconnectException
if 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
-true
if 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.
-
registerPersistentSearch
void 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. -
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. -
allowNewPersistentSearch
boolean allowNewPersistentSearch()Indicates whether a new persistent search is allowed. This is only enforced for local operations because it doesn't doesn't consume significant resources in the proxy.- Returns:
true
if a new persistent search is allowed orfalse
f if not.
-
lockdownMode
boolean lockdownMode()Indicates whether the Directory Server is currently configured to operate in the lockdown mode, in which all non-root requests will be rejected and all connection attempts from non-loopback clients will be rejected.- Returns:
true
if the Directory Server is currently configured to operate in the lockdown mode, orfalse
if not.
-
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 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.
- 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
-
isOffline
boolean isOffline()Returnstrue
if the server is currently offline (i.e. a tool is being run instead).- Returns:
true
if the server is currently offline, orfalse
if not.
-
isRunning
boolean isRunning()Indicates whether the server is currently running.- Returns:
true
if the server is currently running, orfalse
if not.
-
isShuttingDown
boolean isShuttingDown()Returnstrue
if the server is currently in the process of shutting down.- Returns:
true
if the server is currently in the process of shutting down.
-
isAtLeastStarting
boolean isAtLeastStarting()Returnstrue
if the server is at least starting.- Returns:
true
if the server is at least starting
-
getEnvironmentConfig
DirectoryEnvironmentConfig getEnvironmentConfig()Retrieves the environment configuration for the Directory Server.- Returns:
- The environment configuration for the Directory Server.
-
getThreadGroup
ThreadGroup getThreadGroup()Returns the thread groups of all directory threads.- Returns:
- the thread groups of all directory threads.
-
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
LogAggregator getLogAggregator()Returns the log aggregator.- Returns:
- the log aggregator
-
getEntry(Dn)
when possible