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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
checkCanEnqueueRequest(Operation operation, boolean isAllowedInLockDownMode)
Runs all the necessary checks prior to adding an operation to the work queue.void
deregisterAlertGenerator(AlertGenerator alertGenerator)
Deregisters the provided alert generator 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
deregisterConnectionHandler(ConnectionHandler<?> handler)
Deregisters the provided connection handler with the Directory Server.void
deregisterInternalPlugin(InternalDirectoryServerPlugin plugin)
Deregisters the provided internal plugin with the Directory Server.void
deregisterMonitorProvider(MonitorProvider monitorProvider)
Deregisters the specified monitor provider from the Directory Server.void
deregisterPasswordStorageScheme(Dn configEntryDN)
Deregisters the specified password storage scheme with the Directory Server.void
deregisterSASLMechanismHandler(String name)
Deregisters the provided SASL mechanism handler with the Directory Server.void
deregisterShutdownListener(ServerShutdownListener listener)
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
deregisterSupportedExtension(String oid)
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
enqueueRequest(Operation operation)
Adds the provided operation to the work queue so that it will be processed by one of the worker threads.AuthenticationPolicy
getAuthenticationPolicy(Dn configEntryDN)
Retrieves the authentication policy registered for the provided configuration entry.PasswordStorageScheme<?>
getAuthPasswordStorageScheme(String name)
Retrieves the specified authentication password storage scheme.ConcurrentHashMap<String,PasswordStorageScheme<?>>
getAuthPasswordStorageSchemes()
Retrieves the set of authentication password storage schemes defined in the Directory Server, as a mapping between the scheme name and the corresponding implementation.BackendConfigManager
getBackendConfigManager()
Returns the manager of backends.BackupStorageProvider
getBackupStorageProvider(String storageScheme)
Returns the backup storage provider that supports the given storage scheme ornull
if no such storage provider hase been found.CommonAudit
getCommonAudit()
Returns the common audit manager.ConfigurationHandler
getConfigurationHandler()
Returns the configuration handler, which provides operations to the configuration.List<ConnectionHandler<?>>
getConnectionHandlers()
Retrieves the set of connection handlers configured in the Directory Server.CoreConfigManager
getCoreConfigManager()
Returns the manager of core configuration.ScheduledExecutorService
getCronExecutorService()
Returns the UNIX's cron-like executor service.CryptoManager
getCryptoManager()
Returns the Crypto Manager for the instance.long
getCurrentConnections()
Retrieves the number of client connections that are currently established.PasswordPolicy
getDefaultPasswordPolicy()
Retrieves the default password policy for the Directory Server.DiskSpaceMonitor
getDiskSpaceMonitor()
Returns the Disk Space Monitoring service, for checking free disk space.DirectoryEnvironmentConfig
getEnvironment()
Returns the environment of the server.ExtendedOperationHandler<?>
getExtendedOperationHandler(String oid)
Retrieves the handler for the extended operation for the provided OID.HealthChecker
getHealthChecker()
Returns theHealthChecker
that aggregates all theHealthStatusProvider
for diagnosing the global server health.org.forgerock.http.routing.Router
getHttpRouter()
Returns the HTTP request router.Path
getInstanceRoot()
Returns the directory of server instance.KeyManagerProvider<?>
getKeyManagerProvider(Dn keyManagerProviderDN)
Returns the key manager provider matching the provided DN.RequestHandler
getLdapRouter()
Returns the router, which routes the LDAP requests to appropriate backend(s).ProcessId
getLocalProcessId()
Returns the unique identifier for this server process.LockManager
getLockManager()
Returns the lock manager which will be used for coordinating access to LDAP entries.LoggerConfigManager
getLoggerConfigManager()
Returns the logger config manager.long
getMaxConnections()
Retrieves the maximum number of client connections that have been established concurrently.MemoryQuota
getMemoryQuota()
Returns the memory quota system for reserving long term memory.MeterRegistry
getMeterRegistry()
Returns the globalMeterRegistry
that contains all metrics for all monitor providers.PasswordStorageScheme<?>
getPasswordStorageScheme(String lowerName)
Retrieves the specified password storage scheme.PasswordStorageScheme<?>
getPasswordStorageScheme(Dn configEntryDN)
Retrieves the password storage scheme defined in the specified configuration entry.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.PluginConfigManager
getPluginConfigManager()
Retrieves a reference to the Directory Server plugin configuration manager.RootCfg
getRootConfig()
Returns the root configuration object.SASLMechanismHandler<?>
getSASLMechanismHandler(String name)
Retrieves the handler for the specified SASL mechanism.Schema
getSchema()
Returns the schema of the server.SchemaHandler
getSchemaHandler()
Returns the schema handler, which provides operations to the schema.ServerManagementContext
getServerManagementContext()
Returns the server management context, which gives an entry point on configuration objects.Path
getServerRoot()
Returns the root directory of server.ServiceDiscoveryMechanismConfigManager
getServiceDiscoveryMechanismConfigManager()
Returns the Service Discovery Mechanism Config Manager.GeneralizedTime
getStartTime()
Retrieves the time when the Directory Server was started.PrintStream
getStdoutAtProcessStart()
Returns the original stdout at the time the process started, before its redefinition by DJ.SubentryManager
getSubentryManager()
Retrieves the Directory Server subentry manager.Set<String>
getSupportedControls()
Retrieves the set of supported controls registered with the Directory Server.Set<String>
getSupportedExtensions()
Retrieves the set of extended operations that may be processed by the Directory Server.Set<String>
getSupportedFeatures()
Retrieves the set of supported features registered with the Directory Server.Set<Integer>
getSupportedLDAPVersions()
Retrieves the supported LDAP versions for the Directory Server.Set<String>
getSupportedSASLMechanisms()
Retrieves the set of SASL mechanisms that are supported by the Directory Server.Topology
getTopology()
Returns the topology this server participates in.long
getTotalConnections()
Retrieves the total number of client connections that have been established since the Directory Server started.TrustManagerProvider<?>
getTrustManagerProvider(Dn trustManagerProviderDN)
Returns the trust manager provider matching the provided DN.WorkQueue<?>
getWorkQueue()
Retrieves a reference to the Directory Server work queue.boolean
isOffline()
Returnstrue
if the server is currently offline (i.e.boolean
isSupportedControl(String controlOID)
Indicates whether the specified OID is registered with the Directory Server as a supported control.void
registerAlertGenerator(AlertGenerator alertGenerator)
Registers the provided alert generator with the Directory Server.void
registerAuthenticationPolicy(AuthenticationPolicy policy)
Registers the provided authentication policy with the Directory Server.void
registerBackupStorageProvider(BackupStorageProvider backupStorageProvider)
Registers a backup storage provider.void
registerConnectionHandler(ConnectionHandler<? extends ConnectionHandlerCfg> handler)
Registers the provided connection handler with the Directory Server.void
registerInternalPlugin(InternalDirectoryServerPlugin plugin)
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
registerPasswordStorageScheme(Dn configEntryDN, PasswordStorageScheme<?> scheme)
Registers the provided password storage scheme with the Directory Server.void
registerSASLMechanismHandler(String name, SASLMechanismHandler<?> handler)
Registers the provided SASL mechanism handler with the Directory Server.void
registerShutdownListener(ServerShutdownListener listener)
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
resetDefaultPasswordPolicy()
Resets the default password policy to null.boolean
tryEnqueueRequest(Operation operation)
Tries to add the provided operation to the work queue if not full so that it will be processed by one of the worker threads.
-
-
-
Method Detail
-
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
-
getEnvironment
DirectoryEnvironmentConfig getEnvironment()
Returns the environment of the server.- Returns:
- the environment
-
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
-
getLdapRouter
RequestHandler getLdapRouter()
Returns the router, which routes the LDAP requests to appropriate backend(s).- Returns:
- the reactive handler corresponding to the router
-
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
KeyManagerProvider<?> getKeyManagerProvider(Dn keyManagerProviderDN)
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
TrustManagerProvider<?> getTrustManagerProvider(Dn trustManagerProviderDN)
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.
-
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
void registerBackupStorageProvider(BackupStorageProvider backupStorageProvider)
Registers a backup storage provider.- Parameters:
backupStorageProvider
- The backup storage provider to register with the Directory Server.
-
deregisterBackupStorageProvider
void deregisterBackupStorageProvider(BackupStorageProvider backupStorageProvider)
Deregisters a backup storage provider.- Parameters:
backupStorageProvider
- The backup storage provider to deregister from the Directory Server.
-
getBackupStorageProvider
BackupStorageProvider getBackupStorageProvider(String storageScheme)
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
void registerMonitorProvider(MonitorProvider monitorProvider)
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
void deregisterMonitorProvider(MonitorProvider monitorProvider)
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.
-
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
void registerInternalPlugin(InternalDirectoryServerPlugin plugin)
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
void deregisterInternalPlugin(InternalDirectoryServerPlugin plugin)
Deregisters the provided internal plugin with the Directory Server.- Parameters:
plugin
- The internal plugin to deregister from the Directory Server.
-
registerAlertGenerator
void registerAlertGenerator(AlertGenerator alertGenerator)
Registers the provided alert generator with the Directory Server.- Parameters:
alertGenerator
- The alert generator to register.
-
deregisterAlertGenerator
void deregisterAlertGenerator(AlertGenerator alertGenerator)
Deregisters the provided alert generator with the Directory Server.- Parameters:
alertGenerator
- The alert generator to deregister.
-
getPasswordStorageScheme
PasswordStorageScheme<?> getPasswordStorageScheme(Dn configEntryDN)
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
PasswordStorageScheme<?> getPasswordStorageScheme(String lowerName)
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
ConcurrentHashMap<String,PasswordStorageScheme<?>> getAuthPasswordStorageSchemes()
Retrieves the set of authentication password storage schemes defined in the Directory Server, as a mapping between the scheme name and the corresponding implementation.- Returns:
- The set of authentication password storage schemes defined in the Directory Server.
-
getAuthPasswordStorageScheme
PasswordStorageScheme<?> getAuthPasswordStorageScheme(String name)
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
void registerPasswordStorageScheme(Dn configEntryDN, PasswordStorageScheme<?> scheme)
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
void deregisterPasswordStorageScheme(Dn configEntryDN)
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.
-
getAuthenticationPolicy
AuthenticationPolicy getAuthenticationPolicy(Dn configEntryDN)
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
void registerAuthenticationPolicy(AuthenticationPolicy policy)
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
void deregisterAuthenticationPolicy(Dn configEntryDN)
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.
-
getSupportedControls
Set<String> getSupportedControls()
Retrieves the set of supported controls registered with the Directory Server.- Returns:
- The set of supported controls registered with the Directory Server.
-
isSupportedControl
boolean isSupportedControl(String controlOID)
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
void registerSupportedControl(String controlOID)
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
void deregisterSupportedControl(String controlOID)
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
Set<String> getSupportedFeatures()
Retrieves the set of supported features registered with the Directory Server.- Returns:
- The set of supported features registered with the Directory Server.
-
registerSupportedFeature
void registerSupportedFeature(String featureOID)
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
void deregisterSupportedFeature(String featureOID)
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
Set<String> 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
ExtendedOperationHandler<?> getExtendedOperationHandler(String oid)
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
void registerSupportedExtension(String oid, ExtendedOperationHandler<?> handler)
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
void deregisterSupportedExtension(String oid)
Deregisters the provided extended operation handler with the Directory Server.- Parameters:
oid
- The OID for the extended operation to deregister.
-
getSupportedSASLMechanisms
Set<String> 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
SASLMechanismHandler<?> getSASLMechanismHandler(String name)
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
void registerSASLMechanismHandler(String name, SASLMechanismHandler<?> handler)
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
void deregisterSASLMechanismHandler(String name)
Deregisters the provided SASL mechanism handler with the Directory Server.- Parameters:
name
- The name of the SASL mechanism to be deregistered.
-
getSupportedLDAPVersions
Set<Integer> getSupportedLDAPVersions()
Retrieves the supported LDAP versions for the Directory Server.- Returns:
- The supported LDAP versions for the Directory Server.
-
registerSupportedLDAPVersion
void registerSupportedLDAPVersion(int supportedLDAPVersion, ConnectionHandler<?> connectionHandler)
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.
-
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
void registerConnectionHandler(ConnectionHandler<? extends ConnectionHandlerCfg> handler)
Registers the provided connection handler with the Directory Server.- Parameters:
handler
- The connection handler to register with the Directory Server.
-
deregisterConnectionHandler
void deregisterConnectionHandler(ConnectionHandler<?> handler)
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.
-
checkCanEnqueueRequest
void checkCanEnqueueRequest(Operation operation, boolean isAllowedInLockDownMode) throws LdapException
Runs all the necessary checks prior to adding an operation to the work queue. It throws a LdapException if one of the check fails.- Parameters:
operation
- The operation to be added to the work queue.isAllowedInLockDownMode
- Flag to indicate if the request can be added to the work queue regardless of the server's lock down mode.- Throws:
LdapException
- If a check failed preventing the operation from being added to the queue
-
enqueueRequest
void enqueueRequest(Operation operation) throws LdapException
Adds the provided operation to the work queue so that it will be processed by one of the worker threads.- Parameters:
operation
- The operation to be added to the work queue.- Throws:
LdapException
- If a problem prevents the operation from being added to the queue (e.g., the queue is full).
-
tryEnqueueRequest
boolean tryEnqueueRequest(Operation operation) throws LdapException
Tries to add the provided operation to the work queue if not full so that it will be processed by one of the worker threads.- Parameters:
operation
- The operation to be added to the work queue.- Returns:
- true if the operation could be enqueued, false otherwise
- Throws:
LdapException
- If a problem prevents the operation from being added to the queue (e.g., the queue is full).
-
registerShutdownListener
void registerShutdownListener(ServerShutdownListener listener)
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
void deregisterShutdownListener(ServerShutdownListener listener)
Deregisters the provided shutdown listener with the Directory Server.- Parameters:
listener
- The shutdown listener to deregister with the Directory Server.
-
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.
- See Also:
Session.performExtendedHandshake( org.opends.server.replication.common.ServerId, org.opends.server.replication.common.GroupId, org.opends.server.replication.common.ServerState)
-
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.
-
-