public interface DataProvider extends RequestHandler<Operation>
A data provider can be:
A data provider transitions to the accepting requests state when the
startDataProvider()
method is invoked. In this state a data provider
has acquired any remaining resources that it needs in order to be fully
operational. This may include connections to underlying data providers. See
the documentation for startDataProvider()
for more information.
A data provider transitions back to the initialized state using the
stopDataProvider()
method. This occurs when the data provider is no
longer needed in order process client requests, but may still be needed in
order to perform off-line services such as import, export, backup, and
restore.
If data provider is disabled or deleted from the server configuration or if
the server is shutdown, then the finalizeDataProvider()
method is
invoked. This method should ensure that the data provider is stopped and no
longer available for off-line services such as import, export, backup, and
restore.
Modifier and Type | Method and Description |
---|---|
boolean |
containsEntry(DN dn)
Indicates whether this data provider contains the specified entry.
|
void |
deregisterEventListener(DataProviderEventListener listener)
Deregisters an event listener from this data provider.
|
void |
finalizeDataProvider()
Performs any necessary work to finalize this data provider.
|
Set<DN> |
getBaseDNs()
Returns an unmodifiable set containing the base DNs of the sub-trees
which this data provider contains.
|
Entry |
getEntry(DN dn)
Retrieves the specified entry from this data provider.
|
DataProviderStatus |
getStatus(DN baseDN)
Returns the current status of the provided base DN in this data provider.
|
Set<String> |
getSupportedControls(DN baseDN)
Returns an unmodifiable set containing the OIDs of the controls that may
be supported by the provided base DN in this data provider.
|
Set<String> |
getSupportedFeatures(DN baseDN)
Returns an unmodifiable set containing the OIDs of the features that may
be supported by the provided base DN in this data provider.
|
void |
registerEventListener(DataProviderEventListener listener)
Registers an event listener with this data provider.
|
void |
startDataProvider()
Starts this data provider so that it is ready to process client requests.
|
void |
stopDataProvider()
Performs any necessary work to stop this data provider.
|
boolean |
supportsChangeNotification(DN baseDN)
Indicates whether the provided base DN in this data provider
supports change notification.
|
handleAdd, handleBind, handleCompare, handleDelete, handleExtendedRequest, handleModify, handleModifyDN, handleSearch
boolean containsEntry(DN dn) throws LdapException
dn
- The DN of the entry.true
if this data provider contains the specified entry,
or false
if it does not.LdapException
- If a problem occurs while trying to make the determination,
or if dn
is not a DN equal to or subordinate to one
of the base DNs managed by this data provider.void deregisterEventListener(DataProviderEventListener listener)
listener
- The event listener.void finalizeDataProvider()
This method may be called during the Directory Server shutdown process or if a data provider is disabled with the server online. It must not return until this data provider is finalized.
Implementations should assume that this data provider has already been
stopped using stopDataProvider()
.
Implementations must deregister any listeners such as those required for performing import, export, backup, and restore.
Implementations must not throw any exceptions. If any problems are encountered, then they may be logged but the closure should progress as completely as possible.
Set<DN> getBaseDNs()
Entry getEntry(DN dn) throws LdapException
dn
- The DN of the entry.null
if this data provider does
not contain the specified entry.LdapException
- If a problem occurs while trying to retrieve the entry, or if
dn
is not a DN equal to or subordinate to one of the
base DNs managed by this data provider.DataProviderStatus getStatus(DN baseDN) throws LdapException
baseDN
- The base DN in this data provider.LdapException
- If baseDN
is not one of the base DNs managed by this
data provider.Set<String> getSupportedControls(DN baseDN) throws LdapException
baseDN
- The base DN in this data provider.LdapException
- If baseDN
is not one of the base DNs managed by this
data provider.Set<String> getSupportedFeatures(DN baseDN) throws LdapException
baseDN
- The base DN in this data provider.LdapException
- If baseDN
is not one of the base DNs managed by this
data provider.void registerEventListener(DataProviderEventListener listener)
listener
- The event listener.void startDataProvider()
Implementations must acquire any remaining resources in order to make this data provider fully operational. This may include any of the following:
void stopDataProvider()
This method is called immediately after the last data provider connection is closed. It must not return until this data provider is stopped.
Implementations must release all resources acquired when this data provider was started. This includes:
Implementations must not throw any exceptions. If any problems are encountered, then they may be logged but the shutdown should progress as completely as possible.
boolean supportsChangeNotification(DN baseDN) throws LdapException
baseDN
- The base DN in this data provider.true
if the provided base DN in this data provider
supports change notification.LdapException
- If baseDN
is not one of the base DNs managed by this
data provider.Copyright 2010-2017 ForgeRock AS.