Class DirectoryServer
- java.lang.Object
-
- org.opends.server.core.DirectoryServer
-
- All Implemented Interfaces:
AlertGenerator
,ServerContext
public final class DirectoryServer extends Object implements AlertGenerator, ServerContext
This class defines the core of the Directory Server. It manages the startup and shutdown processes and coordinates activities between all other components.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DirectoryServer.DirectoryServerVersionHandler
Class that prints the version of OpenDJ server to System.out.static class
DirectoryServer.InitializationBuilder
Initialize the client DirectoryServer singleton by using a fluent interface.
-
Field Summary
Fields Modifier and Type Field Description static int
CONNECTION_REFUSED_ADMIN_LIMIT_EXCEEDED
The error code returned bynewConnectionAccepted(ClientConnection)
when the maximum number of concurrent connections have already been established.static int
CONNECTION_REFUSED_LOCKDOWN_MODE
The error code returned bynewConnectionAccepted(ClientConnection)
when the server is in lockdown mode.static int
DEFAULT_TIMEOUT
The default timeout used to start the server in detach mode.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static boolean
allowNewPersistentSearch()
Indicates whether a new persistent search is allowed.static void
bootstrapClient()
Bootstraps the appropriate Directory Server structures that may be needed by both server and client-side tools.void
checkCanEnqueueRequest(Operation operation, boolean isAllowedInLockDownMode)
Runs all the necessary checks prior to adding an operation to the work queue.void
clientInit()
Bootstraps the appropriate Directory Server structures that may be needed by both server and client-side tools.static void
connectionClosed(ClientConnection clientConnection)
Indicates that the specified client connection has been closed.static 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.static 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.static void
deregisterBackupTaskListener(BackupTaskListener listener)
Deregisters the provided backup task listener with the Directory Server.static 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.static void
deregisterExportTaskListener(ExportTaskListener listener)
Deregisters the provided LDIF export task listener with the Directory Server.static void
deregisterIdentityMapper(Dn configEntryDN)
Deregisters the provided identity mapper for use with the Directory Server.static void
deregisterImportTaskListener(ImportTaskListener listener)
Deregisters the provided LDIF import task listener 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.static 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.static void
deregisterPasswordValidator(Dn configEntryDN)
Deregisters the provided password validator for use with the Directory Server.static void
deregisterPersistentSearch()
Deregisters a canceled persistent search.static void
deregisterRestoreTaskListener(RestoreTaskListener listener)
Deregisters the provided restore task listener with the Directory Server.static void
deregisterRetentionPolicy(Dn configEntryDN)
Deregisters the provided log retention policy with the Directory Server.static void
deregisterRotationPolicy(Dn configEntryDN)
Deregisters the provided log rotation policy 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.static void
deregisterSynchronizationProvider(SynchronizationProvider<?> provider)
Deregisters the provided synchronization provider with the Directory Server.static void
deregisterVirtualAttribute(VirtualAttributeRule rule)
Deregisters the provided virtual attribute rule with 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.static boolean
entryExists(Dn entryDN)
Indicates whether the specified entry exists in the Directory Server.static AccountStatusNotificationHandler<?>
getAccountStatusNotificationHandler(Dn handlerDN)
Retrieves the account status notification handler with the specified configuration entry DN.static List<AlertHandler<?>>
getAlertHandlers()
Retrieves the set of alert handlers that have been registered with the Directory Server.Map<String,String>
getAlerts()
Retrieves information about the set of alerts that this generator may produce.static AuthenticatedUsers
getAuthenticatedUsers()
Retrieves the authenticated users manager for the Directory Server.static Collection<AuthenticationPolicy>
getAuthenticationPolicies()
Returns an unmodifiable collection containing all of the authentication policies registered with the Directory Server.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.static CertificateMapper<?>
getCertificateMapper(Dn mapperDN)
Retrieves the certificate mapper registered with the provided entry DN.CommonAudit
getCommonAudit()
Returns the common audit manager.Dn
getComponentEntryDN()
Retrieves the DN of the configuration entry with which this alert generator is associated.static Entry
getConfigEntry(Dn entryDN)
Deprecated.usegetEntry(Dn)
when possiblestatic String
getConfigFile()
Retrieves the path to the configuration file used to initialize the Directory Server.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.static CryptoManager
getCryptoManagerImpl()
Retrieves a reference to the Directory Server crypto manager.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.static Entry
getEntry(Dn entryDN)
Retrieves the entry with the requested DN.static EntryCache<?>
getEntryCache()
Retrieves the entry cache for the Directory Server.DirectoryEnvironmentConfig
getEnvironment()
Returns the environment of the server.static DirectoryEnvironmentConfig
getEnvironmentConfig()
Retrieves the environment configuration for the Directory Server.ExtendedOperationHandler<?>
getExtendedOperationHandler(String oid)
Retrieves the handler for the extended operation for the provided OID.static GroupManager
getGroupManager()
Retrieves the Directory Server group manager.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.static IdentityMapper<?>
getIdentityMapper(Dn configEntryDN)
Retrieves the Directory Server identity mapper whose configuration resides in the specified configuration entry.static List<IdentityMapper<?>>
getIdentityMappers(Collection<Dn> configEntriesDNs)
Retrieves the Directory Server identity mappers whose configurations reside in the specified configuration entries.static DirectoryServer
getInstance()
Retrieves the instance of the Directory Server that is associated with this JVM.Path
getInstanceRoot()
Returns the directory of server instance.static Collection<JMXMBean>
getJMXMBeans()
Retrieves the set of JMX MBeans that are associated with the server.static MBeanServer
getJMXMBeanServer()
Retrieves a reference to the JMX MBean server that is associated with the Directory Server.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.static MailServerConfigManager
getMailServerManager()
Retrieves the mail servers manager for the Directory Server.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.static 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.static Entry
getParentEntry(Dn childDn)
Retrieves the entry that is the immediate parent of the entry having the provided DN.static PasswordGenerator<?>
getPasswordGenerator(Dn configEntryDN)
Retrieves the password generator registered with the provided configuration entry DN.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.static PasswordValidator<? extends PasswordValidatorCfg>
getPasswordValidator(Dn configEntryDN)
Retrieves the password validator registered with the provided configuration entry DN.PluginConfigManager
getPluginConfigManager()
Retrieves a reference to the Directory Server plugin configuration manager.static List<IdentityMapper<?>>
getProxiedAuthorizationIdentityMappers()
Retrieves the identity mappers that should be used to resolve authorization IDs contained in proxied authorization V2 controls.static RetentionPolicy<?>
getRetentionPolicy(Dn configEntryDN)
Retrieves the log retention policy registered for the provided configuration entry.RootCfg
getRootConfig()
Returns the root configuration object.static RotationPolicy<?>
getRotationPolicy(Dn configEntryDN)
Retrieves the log rotation policy registered for the provided configuration entry.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.ServerContext
getServerContext()
Returns the server context.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.static List<SynchronizationProvider<? extends SynchronizationProviderCfg>>
getSynchronizationProviders()
Retrieves the set of synchronization providers that have been registered with 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.static String
getVersionString()
Retrieves the full version string for the Directory Server.static Collection<VirtualAttributeRule>
getVirtualAttributes()
Retrieves the set of virtual attribute rules registered with the Directory Server.static Iterable<VirtualAttributeRule>
getVirtualAttributes(Entry entry)
Retrieves the set of virtual attribute rules registered with the Directory Server that are applicable to the provided entry.WorkQueue<?>
getWorkQueue()
Retrieves a reference to the Directory Server work queue.void
initializeConfiguration(Path configFile)
Instantiates the configuration handler and loads the Directory Server configuration.void
initializeSchema()
Initializes the schema handler, which is responsible for building the complete schema for the server.boolean
isOffline()
Returnstrue
if the server is currently offline (i.e.boolean
isRunning()
Indicates whether the Directory Server is currently running.boolean
isShuttingDown()
Indicates whether 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.static Class<?>
loadClass(String name)
Loads the named class using this directory server application's class loader.static 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.static void
main(String[] args)
Parses the provided command-line arguments and uses that information to bootstrap and start the Directory Server.static long
newConnectionAccepted(ClientConnection clientConnection)
Indicates that a new connection has been accepted and increments the associated counters.static void
notifyBackupBeginning(LocalBackend<?> backend)
Notifies the registered backup task listeners that the server will be beginning a backup task with the provided information.static void
notifyBackupEnded(LocalBackend<?> backend)
Notifies the registered backup task listeners that the server has completed processing on a backup task with the provided information.static 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.static 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.static 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.static 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.static void
notifyRestoreBeginning(LocalBackend<?> backend)
Notifies the registered restore task listeners that the server will be beginning a restore task with the provided information.static void
notifyRestoreEnded(LocalBackend<?> backend)
Notifies the registered restore task listeners that the server has completed processing on a restore task with the provided information.static 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.static void
registerAlertHandler(AlertHandler<?> alertHandler)
Registers the provided alert handler 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.static void
registerBackupTaskListener(BackupTaskListener listener)
Registers the provided backup task listener with the Directory Server.static 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.static void
registerExportTaskListener(ExportTaskListener listener)
Registers the provided LDIF export task listener with the Directory Server.static void
registerIdentityMapper(Dn configEntryDN, IdentityMapper<?> identityMapper)
Registers the provided identity mapper for use with the Directory Server.static void
registerImportTaskListener(ImportTaskListener listener)
Registers the provided LDIF import task listener 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.static 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.static void
registerPasswordValidator(Dn configEntryDN, PasswordValidator<? extends PasswordValidatorCfg> validator)
Registers the provided password validator for use with the Directory Server.static void
registerPersistentSearch()
Registers a new persistent search by increasing the count of active persistent searches.static void
registerRestoreTaskListener(RestoreTaskListener listener)
Registers the provided restore task listener with the Directory Server.static void
registerRetentionPolicy(Dn configEntryDN, RetentionPolicy<?> policy)
Registers the provided log retention policy with the Directory Server.static 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
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.static void
registerSynchronizationProvider(SynchronizationProvider<? extends SynchronizationProviderCfg> provider)
Registers the provided synchronization provider with the Directory Server.static void
registerVirtualAttribute(VirtualAttributeRule rule)
Registers the provided virtual attribute rule with the Directory Server.static DirectoryServer
reinitialize(DirectoryEnvironmentConfig config)
Reinitializes the server following a shutdown, preparing it for a call tostartServer
.void
resetDefaultPasswordPolicy()
Resets the default password policy to null.static void
restart(String className, LocalizableMessage reason)
Causes the Directory Server to perform an in-core restart.static void
restart(String className, LocalizableMessage reason, DirectoryEnvironmentConfig config)
Causes the Directory Server to perform an in-core restart.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.static void
setEntryCache(EntryCache<?> entryCache)
Specifies the entry cache that should be used by the Directory Server.void
setEnvironmentConfig(DirectoryEnvironmentConfig config)
Sets the environment configuration for the Directory Server.void
setLockdownMode(boolean lockdownMode)
Specifies whether the server should operate in lockdown mode.static void
shutDown(String className, LocalizableMessage reason)
Initiates the Directory Server shutdown process.void
startServer()
Starts up the Directory Server.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.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opends.server.api.AlertGenerator
getClassName
-
-
-
-
Field Detail
-
CONNECTION_REFUSED_ADMIN_LIMIT_EXCEEDED
public static final int CONNECTION_REFUSED_ADMIN_LIMIT_EXCEEDED
The error code returned bynewConnectionAccepted(ClientConnection)
when the maximum number of concurrent connections have already been established.- See Also:
- Constant Field Values
-
CONNECTION_REFUSED_LOCKDOWN_MODE
public static final int CONNECTION_REFUSED_LOCKDOWN_MODE
The error code returned bynewConnectionAccepted(ClientConnection)
when the server is in lockdown mode.- See Also:
- Constant Field Values
-
DEFAULT_TIMEOUT
public static final int DEFAULT_TIMEOUT
The default timeout used to start the server in detach mode.- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstanceRoot
public Path getInstanceRoot()
Description copied from interface:ServerContext
Returns the directory of server instance.- Specified by:
getInstanceRoot
in interfaceServerContext
- Returns:
- the instance root directory
-
getServerRoot
public Path getServerRoot()
Description copied from interface:ServerContext
Returns the root directory of server.- Specified by:
getServerRoot
in interfaceServerContext
- Returns:
- the server root directory
-
getSchema
public Schema getSchema()
Description copied from interface:ServerContext
Returns the schema of the server.The schema is immutable. Any change on the schema must be done using a
SchemaHandler
which is available through thegetSchemaHandler()
method.- Specified by:
getSchema
in interfaceServerContext
- Returns:
- the schema
-
getSchemaHandler
public SchemaHandler getSchemaHandler()
Description copied from interface:ServerContext
Returns the schema handler, which provides operations to the schema.- Specified by:
getSchemaHandler
in interfaceServerContext
- Returns:
- the schema handler
-
getConfigurationHandler
public ConfigurationHandler getConfigurationHandler()
Description copied from interface:ServerContext
Returns the configuration handler, which provides operations to the configuration.- Specified by:
getConfigurationHandler
in interfaceServerContext
- Returns:
- the configuration handler
-
getEnvironment
public DirectoryEnvironmentConfig getEnvironment()
Description copied from interface:ServerContext
Returns the environment of the server.- Specified by:
getEnvironment
in interfaceServerContext
- Returns:
- the environment
-
getServerManagementContext
public ServerManagementContext getServerManagementContext()
Description copied from interface:ServerContext
Returns the server management context, which gives an entry point on configuration objects.- Specified by:
getServerManagementContext
in interfaceServerContext
- Returns:
- the server management context
-
getRootConfig
public RootCfg getRootConfig()
Description copied from interface:ServerContext
Returns the root configuration object.Equivalent to calling
getServerManagementContext().getRootConfiguration()
.- Specified by:
getRootConfig
in interfaceServerContext
- Returns:
- the root configuration object
-
getLdapRouter
public RequestHandler getLdapRouter()
Description copied from interface:ServerContext
Returns the router, which routes the LDAP requests to appropriate backend(s).- Specified by:
getLdapRouter
in interfaceServerContext
- Returns:
- the reactive handler corresponding to the router
-
getMemoryQuota
public MemoryQuota getMemoryQuota()
Description copied from interface:ServerContext
Returns the memory quota system for reserving long term memory.- Specified by:
getMemoryQuota
in interfaceServerContext
- Returns:
- the memory quota system
-
getDiskSpaceMonitor
public DiskSpaceMonitor getDiskSpaceMonitor()
Description copied from interface:ServerContext
Returns the Disk Space Monitoring service, for checking free disk space. Configure a directory to be monitored and optionally get alerted when disk space transitions from low to full to back to normal.- Specified by:
getDiskSpaceMonitor
in interfaceServerContext
- Returns:
- the Disk Space Monitoring service
-
getHttpRouter
public org.forgerock.http.routing.Router getHttpRouter()
Description copied from interface:ServerContext
Returns the HTTP request router.- Specified by:
getHttpRouter
in interfaceServerContext
- Returns:
- the HTTP Router service
-
getCommonAudit
public CommonAudit getCommonAudit()
Description copied from interface:ServerContext
Returns the common audit manager.- Specified by:
getCommonAudit
in interfaceServerContext
- Returns:
- the common audit manager
-
getLoggerConfigManager
public LoggerConfigManager getLoggerConfigManager()
Description copied from interface:ServerContext
Returns the logger config manager.- Specified by:
getLoggerConfigManager
in interfaceServerContext
- Returns:
- the logger config manager
-
getCryptoManager
public CryptoManager getCryptoManager()
Description copied from interface:ServerContext
Returns the Crypto Manager for the instance.- Specified by:
getCryptoManager
in interfaceServerContext
- Returns:
- the Crypto Manager for the instance
-
getCronExecutorService
public ScheduledExecutorService getCronExecutorService()
Description copied from interface:ServerContext
Returns the UNIX's cron-like executor service.- Specified by:
getCronExecutorService
in interfaceServerContext
- Returns:
- the UNIX's cron-like executor service
-
getBackendConfigManager
public BackendConfigManager getBackendConfigManager()
Description copied from interface:ServerContext
Returns the manager of backends.- Specified by:
getBackendConfigManager
in interfaceServerContext
- Returns:
- backend manager
-
getCoreConfigManager
public CoreConfigManager getCoreConfigManager()
Description copied from interface:ServerContext
Returns the manager of core configuration.- Specified by:
getCoreConfigManager
in interfaceServerContext
- Returns:
- core configuration manager
-
getServiceDiscoveryMechanismConfigManager
public ServiceDiscoveryMechanismConfigManager getServiceDiscoveryMechanismConfigManager()
Description copied from interface:ServerContext
Returns the Service Discovery Mechanism Config Manager.- Specified by:
getServiceDiscoveryMechanismConfigManager
in interfaceServerContext
- Returns:
- the Service Discovery Mechanism Config Manager
-
getKeyManagerProvider
public KeyManagerProvider<?> getKeyManagerProvider(Dn keyManagerProviderDn)
Description copied from interface:ServerContext
Returns the key manager provider matching the provided DN.- Specified by:
getKeyManagerProvider
in interfaceServerContext
- Parameters:
keyManagerProviderDn
- the DN of the key manager provider- Returns:
- the key manager provider, or
null
if none match
-
getTrustManagerProvider
public TrustManagerProvider<?> getTrustManagerProvider(Dn trustManagerProviderDN)
Description copied from interface:ServerContext
Returns the trust manager provider matching the provided DN.- Specified by:
getTrustManagerProvider
in interfaceServerContext
- Parameters:
trustManagerProviderDN
- the DN of the trust manager provider- Returns:
- the trust manager provider, or
null
if none match
-
getMeterRegistry
public MeterRegistry getMeterRegistry()
Description copied from interface:ServerContext
Returns the globalMeterRegistry
that contains all metrics for all monitor providers.- Specified by:
getMeterRegistry
in interfaceServerContext
- Returns:
- The global
MeterRegistry
that contains all metrics for all monitor providers.
-
getCurrentConnections
public long getCurrentConnections()
Description copied from interface:ServerContext
Retrieves the number of client connections that are currently established.- Specified by:
getCurrentConnections
in interfaceServerContext
- Returns:
- The number of client connections that are currently established.
-
getMaxConnections
public long getMaxConnections()
Description copied from interface:ServerContext
Retrieves the maximum number of client connections that have been established concurrently.- Specified by:
getMaxConnections
in interfaceServerContext
- Returns:
- The maximum number of client connections that have been established concurrently.
-
getStartTime
public GeneralizedTime getStartTime()
Description copied from interface:ServerContext
Retrieves the time when the Directory Server was started.- Specified by:
getStartTime
in interfaceServerContext
- Returns:
- The time when the Directory Server was started.
-
getTotalConnections
public long getTotalConnections()
Description copied from interface:ServerContext
Retrieves the total number of client connections that have been established since the Directory Server started.- Specified by:
getTotalConnections
in interfaceServerContext
- Returns:
- The total number of client connections that have been established since the Directory Server started.
-
getLockManager
public LockManager getLockManager()
Description copied from interface:ServerContext
Returns the lock manager which will be used for coordinating access to LDAP entries.- Specified by:
getLockManager
in interfaceServerContext
- Returns:
- the lock manager which will be used for coordinating access to LDAP entries
-
getHealthChecker
public HealthChecker getHealthChecker()
Description copied from interface:ServerContext
Returns theHealthChecker
that aggregates all theHealthStatusProvider
for diagnosing the global server health.- Specified by:
getHealthChecker
in interfaceServerContext
- Returns:
- The health-checker for diagnosing the global server health.
-
getStdoutAtProcessStart
public PrintStream getStdoutAtProcessStart()
Description copied from interface:ServerContext
Returns the original stdout at the time the process started, before its redefinition by DJ.- Specified by:
getStdoutAtProcessStart
in interfaceServerContext
- Returns:
- the original stdout at the time the process started, before its redefinition by DJ
-
registerBackupStorageProvider
public void registerBackupStorageProvider(BackupStorageProvider backupStorageProvider)
Description copied from interface:ServerContext
Registers a backup storage provider.- Specified by:
registerBackupStorageProvider
in interfaceServerContext
- Parameters:
backupStorageProvider
- The backup storage provider to register with the Directory Server.
-
deregisterBackupStorageProvider
public void deregisterBackupStorageProvider(BackupStorageProvider backupStorageProvider)
Description copied from interface:ServerContext
Deregisters a backup storage provider.- Specified by:
deregisterBackupStorageProvider
in interfaceServerContext
- Parameters:
backupStorageProvider
- The backup storage provider to deregister from the Directory Server.
-
getBackupStorageProvider
public BackupStorageProvider getBackupStorageProvider(String storageScheme)
Description copied from interface:ServerContext
Returns the backup storage provider that supports the given storage scheme ornull
if no such storage provider hase been found.- Specified by:
getBackupStorageProvider
in interfaceServerContext
- Parameters:
storageScheme
- The storage scheme.- Returns:
- The backup storage provider that supports the given storage scheme or
null
if no such storage provider hase been found.
-
registerMonitorProvider
public void registerMonitorProvider(MonitorProvider monitorProvider)
Description copied from interface:ServerContext
Registers the provided monitor provider with the Directory Server. Note that if a monitor provider is already registered with the specified name, then it will be replaced with the provided implementation.- Specified by:
registerMonitorProvider
in interfaceServerContext
- Parameters:
monitorProvider
- The monitor provider to register with the Directory Server.
-
deregisterMonitorProvider
public void deregisterMonitorProvider(MonitorProvider monitorProvider)
Description copied from interface:ServerContext
Deregisters the specified monitor provider from the Directory Server. If no such monitor provider is registered, no action will be taken.- Specified by:
deregisterMonitorProvider
in interfaceServerContext
- Parameters:
monitorProvider
- The monitor provider to deregister from the Directory Server.
-
getLocalProcessId
public ProcessId getLocalProcessId()
Description copied from interface:ServerContext
Returns the unique identifier for this server process.The process ID is generated when the server starts and will never be re-used. It can be used for quickly detecting whether a server component is connecting to another server component within the same process, e.g. when a DS connects to an RS within the same JVM.
- Specified by:
getLocalProcessId
in interfaceServerContext
- 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
public Topology getTopology()
Description copied from interface:ServerContext
Returns the topology this server participates in.- Specified by:
getTopology
in interfaceServerContext
- Returns:
- the topology this server participates in
-
isOffline
public boolean isOffline()
Description copied from interface:ServerContext
Returnstrue
if the server is currently offline (i.e. a tool is being run instead).- Specified by:
isOffline
in interfaceServerContext
- Returns:
true
if the server is currently offline, orfalse
if not.
-
getInstance
public static DirectoryServer getInstance()
Retrieves the instance of the Directory Server that is associated with this JVM.- Returns:
- The instance of the Directory Server that is associated with this JVM.
-
getEnvironmentConfig
public static DirectoryEnvironmentConfig getEnvironmentConfig()
Retrieves the environment configuration for the Directory Server.- Returns:
- The environment configuration for the Directory Server.
-
setEnvironmentConfig
public void setEnvironmentConfig(DirectoryEnvironmentConfig config) throws InitializationException
Sets the environment configuration for the Directory Server. This method may only be invoked when the server is not running.- Parameters:
config
- The environment configuration for the Directory Server.- Throws:
InitializationException
- If the Directory Server is currently running.
-
getServerContext
public ServerContext getServerContext()
Returns the server context.- Returns:
- the server context
-
isRunning
public boolean isRunning()
Indicates whether the Directory Server is currently running.- Returns:
true
if the server is currently running, orfalse
if not.
-
bootstrapClient
public static void bootstrapClient()
Bootstraps the appropriate Directory Server structures that may be needed by both server and client-side tools.
-
clientInit
public void clientInit() throws InitializationException
Bootstraps the appropriate Directory Server structures that may be needed by both server and client-side tools.Performs a minimal set of JMX initialization. This may be used by the core Directory Server or by command-line tools.
- Throws:
InitializationException
- If a problem occurs while attempting to initialize the JMX subsystem.
-
initializeConfiguration
public void initializeConfiguration(Path configFile) throws InitializationException
Instantiates the configuration handler and loads the Directory Server configuration.- Parameters:
configFile
- The path to the file that will hold either the entire server configuration or enough information to allow the server to access the configuration in some other repository.- Throws:
InitializationException
- If a problem occurs while trying to initialize the config handler.
-
getConfigFile
public static String getConfigFile()
Retrieves the path to the configuration file used to initialize the Directory Server.- Returns:
- The path to the configuration file used to initialize the Directory Server.
-
startServer
public void startServer() throws ConfigException, InitializationException
Starts up the Directory Server. It must have already been bootstrapped and cannot be running.- Throws:
ConfigException
- If there is a problem with the Directory Server configuration that prevents a critical component from being instantiated.InitializationException
- If some other problem occurs while attempting to initialize and start the Directory Server.
-
getAuthenticatedUsers
public static AuthenticatedUsers getAuthenticatedUsers()
Retrieves the authenticated users manager for the Directory Server.- Returns:
- The authenticated users manager for the Directory Server.
-
getMailServerManager
public static MailServerConfigManager getMailServerManager()
Retrieves the mail servers manager for the Directory Server.- Returns:
- The mail servers manager for this Directory Server.
-
getCryptoManagerImpl
public static CryptoManager getCryptoManagerImpl()
Retrieves a reference to the Directory Server crypto manager.- Returns:
- A reference to the Directory Server crypto manager.
-
initializeSchema
public void initializeSchema() throws InitializationException, ConfigException
Initializes the schema handler, which is responsible for building the complete schema for the server.- Throws:
ConfigException
- If there is a configuration problem with any of the schema elements.InitializationException
- If a problem occurs while initializing the schema that is not related to the server configuration.
-
getGroupManager
public static GroupManager getGroupManager()
Retrieves the Directory Server group manager.- Returns:
- The Directory Server group manager.
-
getSubentryManager
public SubentryManager getSubentryManager()
Description copied from interface:ServerContext
Retrieves the Directory Server subentry manager.- Specified by:
getSubentryManager
in interfaceServerContext
- Returns:
- The Directory Server subentry manager.
-
getPluginConfigManager
public PluginConfigManager getPluginConfigManager()
Description copied from interface:ServerContext
Retrieves a reference to the Directory Server plugin configuration manager.- Specified by:
getPluginConfigManager
in interfaceServerContext
- Returns:
- A reference to the Directory Server plugin configuration manager.
-
registerInternalPlugin
public void registerInternalPlugin(InternalDirectoryServerPlugin plugin)
Description copied from interface:ServerContext
Registers the provided internal plugin with the Directory Server and ensures that it will be invoked in the specified ways.- Specified by:
registerInternalPlugin
in interfaceServerContext
- Parameters:
plugin
- The internal plugin to register with the Directory Server. The plugin must specify a configuration entry which is guaranteed to be unique.
-
deregisterInternalPlugin
public void deregisterInternalPlugin(InternalDirectoryServerPlugin plugin)
Description copied from interface:ServerContext
Deregisters the provided internal plugin with the Directory Server.- Specified by:
deregisterInternalPlugin
in interfaceServerContext
- Parameters:
plugin
- The internal plugin to deregister from the Directory Server.
-
getConfigEntry
@Deprecated public static Entry getConfigEntry(Dn entryDN)
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.
-
getVirtualAttributes
public static 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
public static Iterable<VirtualAttributeRule> getVirtualAttributes(Entry entry)
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
public static void registerVirtualAttribute(VirtualAttributeRule rule)
Registers the provided virtual attribute rule with the Directory Server.- Parameters:
rule
- The virtual attribute rule to be registered.
-
deregisterVirtualAttribute
public static void deregisterVirtualAttribute(VirtualAttributeRule rule)
Deregisters the provided virtual attribute rule with the Directory Server.- Parameters:
rule
- The virtual attribute rule to be deregistered.
-
getJMXMBeanServer
public static 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
public static 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
public void registerAlertGenerator(AlertGenerator alertGenerator)
Description copied from interface:ServerContext
Registers the provided alert generator with the Directory Server.- Specified by:
registerAlertGenerator
in interfaceServerContext
- Parameters:
alertGenerator
- The alert generator to register.
-
deregisterAlertGenerator
public void deregisterAlertGenerator(AlertGenerator alertGenerator)
Description copied from interface:ServerContext
Deregisters the provided alert generator with the Directory Server.- Specified by:
deregisterAlertGenerator
in interfaceServerContext
- Parameters:
alertGenerator
- The alert generator to deregister.
-
getAlertHandlers
public static 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
public static void registerAlertHandler(AlertHandler<?> alertHandler)
Registers the provided alert handler with the Directory Server.- Parameters:
alertHandler
- The alert handler to register.
-
deregisterAlertHandler
public static void deregisterAlertHandler(AlertHandler<?> alertHandler)
Deregisters the provided alert handler with the Directory Server.- Parameters:
alertHandler
- The alert handler to deregister.
-
sendAlertNotification
public 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
public 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
public PasswordStorageScheme<?> getPasswordStorageScheme(Dn configEntryDN)
Description copied from interface:ServerContext
Retrieves the password storage scheme defined in the specified configuration entry.- Specified by:
getPasswordStorageScheme
in interfaceServerContext
- Parameters:
configEntryDN
- The DN of the configuration entry that defines the password storage scheme to retrieve.- Returns:
- The requested password storage scheme, or
null
if no such scheme is defined.
-
getPasswordStorageSchemes
public Collection<PasswordStorageScheme<?>> getPasswordStorageSchemes()
Description copied from interface:ServerContext
Retrieves the set of password storage schemes defined in the Directory Server, as a mapping between the all-lowercase scheme name and the corresponding implementation.- Specified by:
getPasswordStorageSchemes
in interfaceServerContext
- Returns:
- The set of password storage schemes defined in the Directory Server.
-
getPasswordStorageScheme
public PasswordStorageScheme<?> getPasswordStorageScheme(String lowerName)
Description copied from interface:ServerContext
Retrieves the specified password storage scheme.- Specified by:
getPasswordStorageScheme
in interfaceServerContext
- Parameters:
lowerName
- The name of the password storage scheme to retrieve, formatted in all lowercase characters.- Returns:
- The requested password storage scheme, or
null
if no such scheme is defined.
-
getAuthPasswordStorageSchemes
public ConcurrentHashMap<String,PasswordStorageScheme<?>> getAuthPasswordStorageSchemes()
Description copied from interface:ServerContext
Retrieves the set of authentication password storage schemes defined in the Directory Server, as a mapping between the scheme name and the corresponding implementation.- Specified by:
getAuthPasswordStorageSchemes
in interfaceServerContext
- Returns:
- The set of authentication password storage schemes defined in the Directory Server.
-
getAuthPasswordStorageScheme
public PasswordStorageScheme<?> getAuthPasswordStorageScheme(String name)
Description copied from interface:ServerContext
Retrieves the specified authentication password storage scheme.- Specified by:
getAuthPasswordStorageScheme
in interfaceServerContext
- Parameters:
name
- The case-sensitive name of the authentication password storage scheme to retrieve.- Returns:
- The requested authentication password storage scheme, or
null
if no such scheme is defined.
-
registerPasswordStorageScheme
public void registerPasswordStorageScheme(Dn configEntryDN, PasswordStorageScheme<?> scheme)
Description copied from interface:ServerContext
Registers the provided password storage scheme with the Directory Server. If an existing password storage scheme is registered with the same name, then it will be replaced with the provided scheme.- Specified by:
registerPasswordStorageScheme
in interfaceServerContext
- Parameters:
configEntryDN
- The DN of the configuration entry that defines the password storage scheme.scheme
- The password storage scheme to register with the Directory Server.
-
deregisterPasswordStorageScheme
public void deregisterPasswordStorageScheme(Dn configEntryDN)
Description copied from interface:ServerContext
Deregisters the specified password storage scheme with the Directory Server. If no scheme is registered with the specified name, then no action will be taken.- Specified by:
deregisterPasswordStorageScheme
in interfaceServerContext
- Parameters:
configEntryDN
- The DN of the configuration entry that defines the password storage scheme.
-
getPasswordValidator
public static PasswordValidator<? extends PasswordValidatorCfg> getPasswordValidator(Dn configEntryDN)
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
public static 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
public static void deregisterPasswordValidator(Dn configEntryDN)
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
public static AccountStatusNotificationHandler<?> getAccountStatusNotificationHandler(Dn handlerDN)
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
public static 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
public static void deregisterAccountStatusNotificationHandler(Dn handlerDN)
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
public static PasswordGenerator<?> getPasswordGenerator(Dn configEntryDN)
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
public static void registerPasswordGenerator(Dn configEntryDN, PasswordGenerator<?> generator)
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
public static void deregisterPasswordGenerator(Dn configEntryDN)
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
public static 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
public AuthenticationPolicy getAuthenticationPolicy(Dn configEntryDN)
Description copied from interface:ServerContext
Retrieves the authentication policy registered for the provided configuration entry.- Specified by:
getAuthenticationPolicy
in interfaceServerContext
- Parameters:
configEntryDN
- The DN of the configuration entry for which to retrieve the associated authentication policy.- Returns:
- The authentication policy registered for the provided configuration entry, or
null
if there is no such policy.
-
registerAuthenticationPolicy
public void registerAuthenticationPolicy(AuthenticationPolicy policy)
Description copied from interface:ServerContext
Registers the provided authentication policy with the Directory Server. If a policy is already registered for the provided configuration entry DN, then it will be replaced.- Specified by:
registerAuthenticationPolicy
in interfaceServerContext
- Parameters:
policy
- The authentication policy to register with the server.
-
deregisterAuthenticationPolicy
public void deregisterAuthenticationPolicy(Dn configEntryDN)
Description copied from interface:ServerContext
Deregisters the provided authentication policy with the Directory Server. If no such policy is registered, then no action will be taken.- Specified by:
deregisterAuthenticationPolicy
in interfaceServerContext
- Parameters:
configEntryDN
- The DN of the configuration entry that defines the authentication policy to deregister.
-
resetDefaultPasswordPolicy
public void resetDefaultPasswordPolicy()
Description copied from interface:ServerContext
Resets the default password policy to null.- Specified by:
resetDefaultPasswordPolicy
in interfaceServerContext
-
getDefaultPasswordPolicy
public PasswordPolicy getDefaultPasswordPolicy()
Description copied from interface:ServerContext
Retrieves the default password policy for the Directory Server. This method is equivalent to invokinggetAuthenticationPolicy
on the DN returned fromDirectoryServer.getDefaultPasswordPolicyDN()
.- Specified by:
getDefaultPasswordPolicy
in interfaceServerContext
- Returns:
- The default password policy for the Directory Server.
-
getRotationPolicy
public static RotationPolicy<?> getRotationPolicy(Dn configEntryDN)
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
public static void registerRotationPolicy(Dn configEntryDN, RotationPolicy<?> policy)
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
public static void deregisterRotationPolicy(Dn configEntryDN)
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
public static RetentionPolicy<?> getRetentionPolicy(Dn configEntryDN)
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
public static void registerRetentionPolicy(Dn configEntryDN, RetentionPolicy<?> policy)
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
public static void deregisterRetentionPolicy(Dn configEntryDN)
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
public static 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
public static EntryCache<?> getEntryCache()
Retrieves the entry cache for the Directory Server.- Returns:
- The entry cache for the Directory Server.
-
setEntryCache
public static void setEntryCache(EntryCache<?> entryCache)
Specifies the entry cache that should be used by the Directory Server. This should only be called by the entry cache configuration manager.- Parameters:
entryCache
- The entry cache for the Directory Server.
-
getCertificateMapper
public static CertificateMapper<?> getCertificateMapper(Dn mapperDN)
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
public static void registerCertificateMapper(Dn mapperDN, CertificateMapper<?> mapper)
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
public static void deregisterCertificateMapper(Dn mapperDN)
Deregisters the specified certificate mapper with the Directory Server.- Parameters:
mapperDN
- The DN with which the certificate mapper is registered.
-
getParentEntry
public static Entry getParentEntry(Dn childDn) throws LdapException
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
public static Entry getEntry(Dn entryDN) throws LdapException
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.
-
entryExists
public static boolean entryExists(Dn entryDN) throws LdapException
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
public Set<String> getSupportedControls()
Description copied from interface:ServerContext
Retrieves the set of supported controls registered with the Directory Server.- Specified by:
getSupportedControls
in interfaceServerContext
- Returns:
- The set of supported controls registered with the Directory Server.
-
isSupportedControl
public boolean isSupportedControl(String controlOID)
Description copied from interface:ServerContext
Indicates whether the specified OID is registered with the Directory Server as a supported control.- Specified by:
isSupportedControl
in interfaceServerContext
- Parameters:
controlOID
- The OID of the control for which to make the determination.- Returns:
- whether the specified OID is registered with the server as a supported control.
-
registerSupportedControl
public void registerSupportedControl(String controlOID)
Description copied from interface:ServerContext
Registers the provided OID as a supported control for the Directory Server. This will have no effect if the specified control OID is already present in the list of supported controls.- Specified by:
registerSupportedControl
in interfaceServerContext
- Parameters:
controlOID
- The OID of the control to register as a supported control.
-
deregisterSupportedControl
public void deregisterSupportedControl(String controlOID)
Description copied from interface:ServerContext
Deregisters the provided OID as a supported control for the Directory Server. This will have no effect if the specified control OID is not present in the list of supported controls.- Specified by:
deregisterSupportedControl
in interfaceServerContext
- Parameters:
controlOID
- The OID of the control to deregister as a supported control.
-
getSupportedFeatures
public Set<String> getSupportedFeatures()
Description copied from interface:ServerContext
Retrieves the set of supported features registered with the Directory Server.- Specified by:
getSupportedFeatures
in interfaceServerContext
- Returns:
- The set of supported features registered with the Directory Server.
-
registerSupportedFeature
public void registerSupportedFeature(String featureOID)
Description copied from interface:ServerContext
Registers the provided OID as a supported feature for the Directory Server. This will have no effect if the specified feature OID is already present in the list of supported features.- Specified by:
registerSupportedFeature
in interfaceServerContext
- Parameters:
featureOID
- The OID of the feature to register as a supported feature.
-
deregisterSupportedFeature
public void deregisterSupportedFeature(String featureOID)
Description copied from interface:ServerContext
Deregisters the provided OID as a supported feature for the Directory Server. This will have no effect if the specified feature OID is not present in the list of supported features.- Specified by:
deregisterSupportedFeature
in interfaceServerContext
- Parameters:
featureOID
- The OID of the feature to deregister as a supported feature.
-
getSupportedExtensions
public Set<String> getSupportedExtensions()
Description copied from interface:ServerContext
Retrieves the set of extended operations that may be processed by the Directory Server.- Specified by:
getSupportedExtensions
in interfaceServerContext
- Returns:
- The set of extended operations that may be processed by the Directory Server.
-
getExtendedOperationHandler
public ExtendedOperationHandler<?> getExtendedOperationHandler(String oid)
Description copied from interface:ServerContext
Retrieves the handler for the extended operation for the provided OID.- Specified by:
getExtendedOperationHandler
in interfaceServerContext
- Parameters:
oid
- The OID of the extended operation to retrieve.- Returns:
- The handler for the specified extended operation, or
null
if there is none.
-
registerSupportedExtension
public void registerSupportedExtension(String oid, ExtendedOperationHandler<?> handler)
Description copied from interface:ServerContext
Registers the provided extended operation handler with the Directory Server.- Specified by:
registerSupportedExtension
in interfaceServerContext
- Parameters:
oid
- The OID for the extended operation to register.handler
- The extended operation handler to register with the Directory Server.
-
deregisterSupportedExtension
public void deregisterSupportedExtension(String oid)
Description copied from interface:ServerContext
Deregisters the provided extended operation handler with the Directory Server.- Specified by:
deregisterSupportedExtension
in interfaceServerContext
- Parameters:
oid
- The OID for the extended operation to deregister.
-
getSupportedSASLMechanisms
public Set<String> getSupportedSASLMechanisms()
Description copied from interface:ServerContext
Retrieves the set of SASL mechanisms that are supported by the Directory Server.- Specified by:
getSupportedSASLMechanisms
in interfaceServerContext
- Returns:
- The set of SASL mechanisms that are supported by the Directory Server.
-
getSASLMechanismHandler
public SASLMechanismHandler<?> getSASLMechanismHandler(String name)
Description copied from interface:ServerContext
Retrieves the handler for the specified SASL mechanism.- Specified by:
getSASLMechanismHandler
in interfaceServerContext
- Parameters:
name
- The name of the SASL mechanism to retrieve.- Returns:
- The handler for the specified SASL mechanism, or
null
if there is none.
-
registerSASLMechanismHandler
public void registerSASLMechanismHandler(String name, SASLMechanismHandler<?> handler)
Description copied from interface:ServerContext
Registers the provided SASL mechanism handler with the Directory Server.- Specified by:
registerSASLMechanismHandler
in interfaceServerContext
- Parameters:
name
- The name of the SASL mechanism to be registered.handler
- The SASL mechanism handler to register with the Directory Server.
-
deregisterSASLMechanismHandler
public void deregisterSASLMechanismHandler(String name)
Description copied from interface:ServerContext
Deregisters the provided SASL mechanism handler with the Directory Server.- Specified by:
deregisterSASLMechanismHandler
in interfaceServerContext
- Parameters:
name
- The name of the SASL mechanism to be deregistered.
-
getSupportedLDAPVersions
public Set<Integer> getSupportedLDAPVersions()
Description copied from interface:ServerContext
Retrieves the supported LDAP versions for the Directory Server.- Specified by:
getSupportedLDAPVersions
in interfaceServerContext
- Returns:
- The supported LDAP versions for the Directory Server.
-
registerSupportedLDAPVersion
public void registerSupportedLDAPVersion(int supportedLDAPVersion, ConnectionHandler<?> connectionHandler)
Description copied from interface:ServerContext
Registers the provided LDAP protocol version as supported within the Directory Server.- Specified by:
registerSupportedLDAPVersion
in interfaceServerContext
- Parameters:
supportedLDAPVersion
- The LDAP protocol version to register as supported.connectionHandler
- The connection handler that supports the provided LDAP version. Note that multiple connection handlers can provide support for the same LDAP versions.
-
deregisterSupportedLDAPVersion
public void deregisterSupportedLDAPVersion(int supportedLDAPVersion, ConnectionHandler<?> connectionHandler)
Deregisters the provided LDAP protocol version as supported within the Directory Server.- Specified by:
deregisterSupportedLDAPVersion
in interfaceServerContext
- Parameters:
supportedLDAPVersion
- The LDAP protocol version to deregister.connectionHandler
- The connection handler that no longer supports the provided LDAP version.
-
getIdentityMapper
public static IdentityMapper<?> getIdentityMapper(Dn configEntryDN)
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
public static List<IdentityMapper<?>> getIdentityMappers(Collection<Dn> configEntriesDNs)
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
public static void registerIdentityMapper(Dn configEntryDN, IdentityMapper<?> identityMapper)
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
public static void deregisterIdentityMapper(Dn configEntryDN)
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
public static 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
public List<ConnectionHandler<?>> getConnectionHandlers()
Description copied from interface:ServerContext
Retrieves the set of connection handlers configured in the Directory Server. The returned list must not be altered.- Specified by:
getConnectionHandlers
in interfaceServerContext
- Returns:
- The set of connection handlers configured in the Directory Server.
-
registerConnectionHandler
public void registerConnectionHandler(ConnectionHandler<? extends ConnectionHandlerCfg> handler)
Description copied from interface:ServerContext
Registers the provided connection handler with the Directory Server.- Specified by:
registerConnectionHandler
in interfaceServerContext
- Parameters:
handler
- The connection handler to register with the Directory Server.
-
deregisterConnectionHandler
public void deregisterConnectionHandler(ConnectionHandler<?> handler)
Description copied from interface:ServerContext
Deregisters the provided connection handler with the Directory Server.- Specified by:
deregisterConnectionHandler
in interfaceServerContext
- Parameters:
handler
- The connection handler to deregister with the Directory Server.
-
getWorkQueue
public WorkQueue<?> getWorkQueue()
Description copied from interface:ServerContext
Retrieves a reference to the Directory Server work queue.- Specified by:
getWorkQueue
in interfaceServerContext
- Returns:
- A reference to the Directory Server work queue.
-
checkCanEnqueueRequest
public void checkCanEnqueueRequest(Operation operation, boolean isAllowedInLockDownMode) throws LdapException
Description copied from interface:ServerContext
Runs all the necessary checks prior to adding an operation to the work queue. It throws a LdapException if one of the check fails.- Specified by:
checkCanEnqueueRequest
in interfaceServerContext
- 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
public void enqueueRequest(Operation operation) throws LdapException
Description copied from interface:ServerContext
Adds the provided operation to the work queue so that it will be processed by one of the worker threads.- Specified by:
enqueueRequest
in interfaceServerContext
- 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
public boolean tryEnqueueRequest(Operation operation) throws LdapException
Description copied from interface:ServerContext
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.- Specified by:
tryEnqueueRequest
in interfaceServerContext
- 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).
-
getSynchronizationProviders
public static 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
public static void registerSynchronizationProvider(SynchronizationProvider<? extends SynchronizationProviderCfg> provider)
Registers the provided synchronization provider with the Directory Server.- Parameters:
provider
- The synchronization provider to register.
-
deregisterSynchronizationProvider
public static void deregisterSynchronizationProvider(SynchronizationProvider<?> provider)
Deregisters the provided synchronization provider with the Directory Server.- Parameters:
provider
- The synchronization provider to deregister.
-
registerBackupTaskListener
public static void registerBackupTaskListener(BackupTaskListener listener)
Registers the provided backup task listener with the Directory Server.- Parameters:
listener
- The backup task listener to register with the Directory Server.
-
deregisterBackupTaskListener
public static void deregisterBackupTaskListener(BackupTaskListener listener)
Deregisters the provided backup task listener with the Directory Server.- Parameters:
listener
- The backup task listener to deregister with the Directory Server.
-
notifyBackupBeginning
public static void notifyBackupBeginning(LocalBackend<?> backend)
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
public static void notifyBackupEnded(LocalBackend<?> backend)
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
public static void registerRestoreTaskListener(RestoreTaskListener listener)
Registers the provided restore task listener with the Directory Server.- Parameters:
listener
- The restore task listener to register with the Directory Server.
-
deregisterRestoreTaskListener
public static void deregisterRestoreTaskListener(RestoreTaskListener listener)
Deregisters the provided restore task listener with the Directory Server.- Parameters:
listener
- The restore task listener to deregister with the Directory Server.
-
notifyRestoreBeginning
public static void notifyRestoreBeginning(LocalBackend<?> backend)
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
public static void notifyRestoreEnded(LocalBackend<?> backend)
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
public static void registerExportTaskListener(ExportTaskListener listener)
Registers the provided LDIF export task listener with the Directory Server.- Parameters:
listener
- The export task listener to register with the Directory Server.
-
deregisterExportTaskListener
public static void deregisterExportTaskListener(ExportTaskListener listener)
Deregisters the provided LDIF export task listener with the Directory Server.- Parameters:
listener
- The export task listener to deregister with the Directory Server.
-
notifyExportBeginning
public static 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.- Parameters:
backend
- The backend in which the export is to be performed.config
- The configuration for the export to be performed.
-
notifyExportEnded
public static 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.- Parameters:
backend
- The backend in which the export was performed.config
- The configuration for the export that was performed.successful
- Indicates whether the export completed successfully.
-
registerImportTaskListener
public static void registerImportTaskListener(ImportTaskListener listener)
Registers the provided LDIF import task listener with the Directory Server.- Parameters:
listener
- The import task listener to register with the Directory Server.
-
deregisterImportTaskListener
public static void deregisterImportTaskListener(ImportTaskListener listener)
Deregisters the provided LDIF import task listener with the Directory Server.- Parameters:
listener
- The import task listener to deregister with the Directory Server.
-
notifyImportBeginning
public static 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.- Parameters:
backend
- The backend in which the import is to be performed.config
- The configuration for the import to be performed.
-
notifyImportEnded
public static 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.- Parameters:
backend
- The backend in which the import was performed.config
- The configuration for the import that was performed.successful
- Indicates whether the import completed successfully.
-
registerShutdownListener
public void registerShutdownListener(ServerShutdownListener listener)
Description copied from interface:ServerContext
Registers the provided shutdown listener with the Directory Server so that it will be notified when the server shuts down.- Specified by:
registerShutdownListener
in interfaceServerContext
- Parameters:
listener
- The shutdown listener to register with the Directory Server.
-
deregisterShutdownListener
public void deregisterShutdownListener(ServerShutdownListener listener)
Description copied from interface:ServerContext
Deregisters the provided shutdown listener with the Directory Server.- Specified by:
deregisterShutdownListener
in interfaceServerContext
- Parameters:
listener
- The shutdown listener to deregister with the Directory Server.
-
shutDown
public static void shutDown(String className, LocalizableMessage reason)
Initiates the Directory Server shutdown process. Note that once this has started, it should not be interrupted.- Parameters:
className
- The fully-qualified name of the Java class that initiated the shutdown.reason
- The human-readable reason that the directory server is shutting down.
-
restart
public static void restart(String className, LocalizableMessage reason)
Causes the Directory Server to perform an in-core restart. This will cause virtually all components of the Directory Server to shut down, and once that has completed it will be restarted.- Parameters:
className
- The fully-qualified name of the Java class that initiated the shutdown.reason
- The human-readable reason that the directory server is shutting down.
-
restart
public static void restart(String className, LocalizableMessage reason, DirectoryEnvironmentConfig config)
Causes the Directory Server to perform an in-core restart. This will cause virtually all components of the Directory Server to shut down, and once that has completed it will be restarted.- Parameters:
className
- The fully-qualified name of the Java class that initiated the shutdown.reason
- The human-readable reason that the directory server is shutting down.config
- The environment configuration to use for the server.
-
reinitialize
public static DirectoryServer reinitialize(DirectoryEnvironmentConfig config) throws InitializationException
Reinitializes the server following a shutdown, preparing it for a call tostartServer
.- Parameters:
config
- The environment configuration for the Directory Server.- Returns:
- The new Directory Server instance created during the re-initialization process.
- Throws:
InitializationException
- If a problem occurs while trying to initialize the config handler or bootstrap that server.
-
newConnectionAccepted
public static long newConnectionAccepted(ClientConnection clientConnection)
Indicates that a new connection has been accepted and increments the associated counters.- Parameters:
clientConnection
- The client connection that has been established.- Returns:
- The connection ID that should be used for this connection, or a negative number if the connection has been rejected for some reason (e.g., the maximum number of concurrent connections have already been established).
-
connectionClosed
public static void connectionClosed(ClientConnection clientConnection)
Indicates that the specified client connection has been closed.- Parameters:
clientConnection
- The client connection that has been closed.
-
getVersionString
public static String getVersionString()
Retrieves the full version string for the Directory Server.- Returns:
- The full version string for the Directory Server.
-
registerPersistentSearch
public static 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
public static 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
public static boolean allowNewPersistentSearch()
Indicates whether a new persistent search is allowed.- Returns:
true
if a new persistent search is allowed orfalse
f if not.
-
lockdownMode
public static 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
public 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.
-
getComponentEntryDN
public Dn getComponentEntryDN()
Description copied from interface:AlertGenerator
Retrieves the DN of the configuration entry with which this alert generator is associated.- Specified by:
getComponentEntryDN
in interfaceAlertGenerator
- Returns:
- The DN of the configuration entry with which this alert generator is associated.
-
getAlerts
public Map<String,String> getAlerts()
Description copied from interface:AlertGenerator
Retrieves information about the set of alerts that this generator may produce. The map returned should be between the notification type for a particular notification and the human-readable description for that notification. This alert generator must not generate any alerts with types that are not contained in this list.- Specified by:
getAlerts
in interfaceAlertGenerator
- Returns:
- Information about the set of alerts that this generator may produce.
-
isShuttingDown
public boolean isShuttingDown()
Indicates whether the server is currently in the process of shutting down.- Returns:
true
if this server is currently in the process of shutting down andfalse
otherwise.
-
main
public static void main(String[] args)
Parses the provided command-line arguments and uses that information to bootstrap and start the Directory Server.- Parameters:
args
- The command-line arguments provided to this program.
-
loadClass
public static Class<?> loadClass(String name) throws ClassNotFoundException
Loads the named class using this directory server application's class loader.This method provided as a convenience and is equivalent to calling:
Class.forName(name, true, DirectoryServer.getClassLoader());
- Parameters:
name
- The fully qualified name of the desired class.- Returns:
- Returns the class object representing the desired class.
- Throws:
ClassNotFoundException
- If the class cannot be located by the specified class loader.- See Also:
Class.forName(String, boolean, ClassLoader)
-
-