public class LDAPEntryReader extends BackgroundTask<org.forgerock.opendj.ldap.Entry>
Constructor and Description |
---|
LDAPEntryReader(org.forgerock.opendj.ldap.Dn dn,
ConnectionWithControls conn)
Constructor of the entry reader.
|
Modifier and Type | Method and Description |
---|---|
void |
addEntryReadListener(EntryReadListener listener)
Adds an EntryReadListener.
|
void |
backgroundTaskCompleted(org.forgerock.opendj.ldap.Entry sr,
Throwable throwable)
This method will be invoked to indicate that the background task has
completed.
|
boolean |
isNotifyListeners()
Returns whether this entry reader will notify the listeners once it is
over.
|
boolean |
isOver()
Returns
true if the read process is over and
false otherwise. |
org.forgerock.opendj.ldap.Entry |
processBackgroundTask()
Performs all processing associated with the task.
|
void |
removeEntryReadListener(EntryReadListener listener)
Removes an EntryReadListener.
|
void |
setNotifyListeners(boolean notifyListeners)
Sets whether this entry reader will notify the listeners once it is
over.
|
interrupt, isInterrupted, startBackgroundTask
public LDAPEntryReader(org.forgerock.opendj.ldap.Dn dn, ConnectionWithControls conn)
dn
- the DN of the entry.conn
- the connection to the server.public org.forgerock.opendj.ldap.Entry processBackgroundTask() throws Throwable
BackgroundTask
processBackgroundTask
in class BackgroundTask<org.forgerock.opendj.ldap.Entry>
Object
with information about the processing performed
for this task, or null
if no return value is needed.Throwable
- throwable that will be passed through the method
backgroundTaskCompleted.public void backgroundTaskCompleted(org.forgerock.opendj.ldap.Entry sr, Throwable throwable)
BackgroundTask
Throwable
argument will be null
and the returnValue
argument will contain the value returned by the
processBackgroundTask
method. If an exception or error was thrown,
then the throwable
argument will not be null
.backgroundTaskCompleted
in class BackgroundTask<org.forgerock.opendj.ldap.Entry>
sr
- The value returned by the
processBackgroundTask
method when processing
completed, or null
if no value was returned or
an exception was encountered during processing.throwable
- A Throwable
instance (e.g., an exception) that
was raised during processing, or null
if all
processing completed successfully.public boolean isNotifyListeners()
public void setNotifyListeners(boolean notifyListeners)
notifyListeners
- whether this entry reader will notify the listeners
once it is over.public boolean isOver()
true
if the read process is over and
false
otherwise.true
if the read process is over and
false
otherwise.public void addEntryReadListener(EntryReadListener listener)
listener
- the listener.public void removeEntryReadListener(EntryReadListener listener)
listener
- the listener.Copyright © 2010-2017 ForgeRock AS. All Rights Reserved.