T
- Type of listener.H
- Supported token types.public abstract class LDAPv3PersistentSearch<T,H> extends Object
Modifier and Type | Class and Description |
---|---|
protected static interface |
LDAPv3PersistentSearch.SearchResultEntryHandler
This interface represents the ability of a listener to return result entries.
|
Constructor and Description |
---|
LDAPv3PersistentSearch(int retryInterval,
org.forgerock.opendj.ldap.DN searchBaseDN,
org.forgerock.opendj.ldap.Filter searchFilter,
org.forgerock.opendj.ldap.SearchScope searchScope,
ConnectionFactory factory,
String... attributeNames)
Generate a new LDAPv3PersistentSearch.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(T idRepoListener,
H supportedTypes)
Adds an
IdRepoListener object, which needs to be notified about persistent search results. |
protected abstract void |
clearCaches() |
protected Map<T,H> |
getListeners() |
protected abstract LDAPv3PersistentSearch.SearchResultEntryHandler |
getSearchResultEntryHandler()
Returns the
SearchResultEntryHandler for the concrete implementation. |
boolean |
hasListeners()
Checks if there are any registered listeners for this persistent search connection.
|
protected boolean |
isShutdown() |
void |
removeListener(T idRepoListener)
Removes an
IdRepoListener if it was registered to persistent search notifications. |
void |
startQuery()
Starts the persistent search connection against the directory.
|
void |
stopSearch()
Stops the persistent search request, and terminates the LDAP connection.
|
public LDAPv3PersistentSearch(int retryInterval, org.forgerock.opendj.ldap.DN searchBaseDN, org.forgerock.opendj.ldap.Filter searchFilter, org.forgerock.opendj.ldap.SearchScope searchScope, ConnectionFactory factory, String... attributeNames)
retryInterval
- How frequently to reconnect (in milliseconds).searchBaseDN
- The base DN from which to perform the query.searchFilter
- The filter which forms the query's parameters.searchScope
- The scope of the search, from the searchBaseDN.factory
- A connection factory used to produce connections down to LDAP.attributeNames
- Attribute names which will be returned alongside the DN of the query-resulted objects.public void addListener(T idRepoListener, H supportedTypes)
IdRepoListener
object, which needs to be notified about persistent search results.
The caller must ensure that calls to addListener/removeListener/hasListeners invocations are synchronized
correctly.idRepoListener
- The IdRepoListener
instance that needs to be notified about changes.supportedTypes
- The supported IdType
s for which events needs to be generated.public void removeListener(T idRepoListener)
IdRepoListener
if it was registered to persistent search notifications.
The caller must ensure that calls to addListener/removeListener/hasListeners invocations are synchronized
correctly.idRepoListener
- The IdRepoListener
instance that needs to be notified about changes.public boolean hasListeners()
public void startQuery() throws DataLayerException
DataLayerException
- if the initial connection could not be created.public void stopSearch()
protected abstract void clearCaches()
protected abstract LDAPv3PersistentSearch.SearchResultEntryHandler getSearchResultEntryHandler()
SearchResultEntryHandler
for the concrete implementation.SearchResultEntryHandler
for this implementation.protected boolean isShutdown()
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.