public abstract class AbstractDataProvider extends Object implements DataProvider
DataProvider
interface, to minimize the effort required to implement this interface.Modifier | Constructor and Description |
---|---|
protected |
AbstractDataProvider()
Creates a new abstract data provider.
|
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.
|
protected void |
notifyDataProviderEventOccurred(DataProviderEvent event)
Notify all event listeners that this data provider has changed state due
to an operational error, configuration change, or an administrative
action.
|
protected void |
notifyDataProviderEventOccurred(LocalizableMessage reason,
Set<DataProviderEvent.Type> types)
Notify all event listeners that this data provider has changed state due
to an operational error, configuration change, or an administrative
action.
|
void |
registerEventListener(DataProviderEventListener listener)
Registers an event listener with this data provider.
|
boolean |
supportsChangeNotification(DN baseDN)
Indicates whether the provided base DN in this data provider
supports change notification.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
finalizeDataProvider, getBaseDNs, getEntry, getStatus, getSupportedControls, getSupportedFeatures, startDataProvider, stopDataProvider
handleAdd, handleBind, handleCompare, handleDelete, handleExtendedRequest, handleModify, handleModifyDN, handleSearch
protected AbstractDataProvider()
public boolean containsEntry(DN dn) throws LdapException
The default implementation is to invoke getEntry(dn)
and return
true
if the entry was successfully retrieved.
containsEntry
in interface DataProvider
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.public final void deregisterEventListener(DataProviderEventListener listener)
deregisterEventListener
in interface DataProvider
listener
- The event listener.public final void registerEventListener(DataProviderEventListener listener)
registerEventListener
in interface DataProvider
listener
- The event listener.public boolean supportsChangeNotification(DN baseDN) throws LdapException
The default implementation is to return false for all base DNs indicating that change notification is not supported.
supportsChangeNotification
in interface DataProvider
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.protected final void notifyDataProviderEventOccurred(DataProviderEvent event)
This method can be used to forward events to parent data providers.
event
- The data provider event.protected final void notifyDataProviderEventOccurred(LocalizableMessage reason, Set<DataProviderEvent.Type> types)
This method is equivalent to the following code:
DataProviderEvent event = new DataProviderEvent(reason, types); notifyDataProviderStateChanged(event);
reason
- A message describing this event.types
- The types of event that have occurred in the data provider.Copyright 2010-2017 ForgeRock AS.