com.unboundid.directory.sdk.ds.types
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
 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 the BackendContext 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
createThread, debugCaught, debugEnabled, debugError, debugInfo, debugThrown, debugVerbose, debugWarning, deregisterAllMonitorProviders, deregisterChangeListener, deregisterDiskSpaceConsumer, deregisterMonitorProvider, deregisterShutdownListener, deregisterSupportedControlOID, getClientConnection, getClientRootConnection, getCompactProductName, getFullProductName, getFullVendorName, getInstanceName, getInternalConnection, getInternalRootConnection, getMajorVersionNumber, getMinorVersionNumber, getPackageName, getPatchVersionNumber, getPointVersionNumber, getSchema, getServerRoot, getShortVendorName, getSourceRevision, getStartTime, getStartupID, getStartupUUID, getVersionQualifier, isDirectoryFunctionalityAvailable, isDirectoryProxyFunctionalityAvailable, isRunning, isShuttingDown, isStarting, isSyncFunctionalityAvailable, logMessage, registerChangeListener, registerDiskSpaceConsumer, registerMonitorProvider, registerShutdownListener, registerSupportedControlOID, sendAlert, sendAlert
 

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 com.unboundid.ldap.sdk.LDAPException
Returns the BackendContext 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 for BackendContext.handlesEntry(String) when given the specified DN.

Parameters:
dn - The DN for which to make the determination. It must not be null.
Returns:
The BackendContext for the given entry, or null if no such backend exists.
Throws:
com.unboundid.ldap.sdk.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 be null.
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 be null.