Interface DirectoryServerContext
-
- All Superinterfaces:
ServerContext
@NotExtensible @ThreadSafety(level=INTERFACE_THREADSAFE) public interface DirectoryServerContext extends ServerContext
This interface may be used to obtain information about the Directory Server (or related product) in which an extension is running.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
deregisterBackendInitializationListener(RegisteredBackendInitializationListener listener)
Deregisters the provided backend initialization listener with the server.BackendContext[]
getAllBackends()
Returns an array of all the backends defined in the Directory Server.BackendContext
getBackendForEntry(java.lang.String dn)
Returns theBackendContext
for the backend which should handle the specified entry, or null if there is no backend that handles this entry.RegisteredBackendInitializationListener
registerBackendInitializationListener(BackendInitializationListener listener)
Registers the provided backend initialization listener with the server so that it may be notified of any backends coming online or going offline.-
Methods inherited from interface com.unboundid.directory.sdk.common.types.ServerContext
createEMailAttachment, createEMailMessage, createThread, createValueConstructor, debugCaught, debugEnabled, debugError, debugInfo, debugThrown, debugVerbose, debugWarning, deregisterAllMonitorProviders, deregisterChangeListener, deregisterDiskSpaceConsumer, deregisterMonitorProvider, deregisterShutdownListener, deregisterSupportedControlOID, getBasicProductName, getClientConnection, getClientRootConnection, getCompactProductName, getEncryptedOutputStream, getEncryptedOutputStream, getEncryptionSettingsDefinition, getEncryptionSettingsDefinitions, getFullProductName, getFullVendorName, getFullVersion, getGroup, getGroupsForUser, getInstanceName, getInternalConnection, getInternalRootConnection, getLDAPExternalServerConnection, getLDAPExternalServerConnectionPool, getLocation, getMajorVersionNumber, getMinorVersionNumber, getObscuredValue, getPackageName, getPassphraseFromPassphraseProvider, getPatchVersionNumber, getPointVersionNumber, getPossiblyCompressedAndEncryptedInputStream, getPossiblyCompressedAndEncryptedInputStream, getPreferredEncryptionSettingsDefinition, getPrivilegeNames, getSchema, getServerRoot, getShortVendorName, getSourceRevision, getStartTime, getStartupID, getStartupUUID, getToolExecutor, getVersionNumber, getVersionQualifier, hasPrivilege, isDirectoryFunctionalityAvailable, isDirectoryProxyFunctionalityAvailable, isRunning, isShuttingDown, isStarting, isSyncFunctionalityAvailable, isTraceMessageLoggable, logMessage, logTraceMessage, logTraceMessage, registerChangeListener, registerDiskSpaceConsumer, registerMonitorProvider, registerShutdownListener, registerSupportedControlOID, reloadHTTPConnectionHandlerCertificates, sendAlert, sendAlert, sendDegradedAlertNotification, sendUnavailableAlertNotification
-
-
-
-
Method Detail
-
getAllBackends
BackendContext[] getAllBackends()
Returns an array of all the backends defined in the Directory Server.- Returns:
- an array of
BackendContext
objects. This will never be null.
-
getBackendForEntry
BackendContext getBackendForEntry(java.lang.String dn) throws LDAPException
Returns theBackendContext
for the backend which should handle the specified entry, or null if there is no backend that handles this entry. Note that the entry does not need to exist. If a BackendContext is returned, it will return true forBackendContext.handlesEntry(String)
when given the specified DN.- Parameters:
dn
- The DN for which to make the determination. It must not benull
.- Returns:
- The
BackendContext
for the given entry, or null if no such backend exists. - Throws:
LDAPException
- If the provided string cannot be parsed as a valid DN or if a problem is encountered while attempting to retrieve the BackendContext.
-
registerBackendInitializationListener
RegisteredBackendInitializationListener registerBackendInitializationListener(BackendInitializationListener listener)
Registers the provided backend initialization listener with the server so that it may be notified of any backends coming online or going offline.- Parameters:
listener
- The backend initialization listener to be registered with the server. It must not benull
.- Returns:
- An object representing the backend initialization listener that has been registered with the server.
-
deregisterBackendInitializationListener
void deregisterBackendInitializationListener(RegisteredBackendInitializationListener listener)
Deregisters the provided backend initialization listener with the server. This will have no effect if the provided listener is not registered.- Parameters:
listener
- The listener to be deregistered. It must not benull
.
-
-