Class LDAPEntryReader
- java.lang.Object
-
- org.opends.guitools.controlpanel.util.BackgroundTask<Entry>
-
- org.opends.guitools.controlpanel.util.LDAPEntryReader
-
public class LDAPEntryReader extends BackgroundTask<Entry>
A class that reads an entry on the background. This is used in the LDAP entries browser. When the entry is read it notifies to the EntryReadListener objects that have been registered.
-
-
Constructor Summary
Constructors Constructor Description LDAPEntryReader(DN dn, ConnectionWithControls conn)Constructor of the entry reader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEntryReadListener(EntryReadListener listener)Adds an EntryReadListener.voidbackgroundTaskCompleted(Entry sr, Throwable throwable)This method will be invoked to indicate that the background task has completed.booleanisNotifyListeners()Returns whether this entry reader will notify the listeners once it is over.booleanisOver()Returnstrueif the read process is over andfalseotherwise.EntryprocessBackgroundTask()Performs all processing associated with the task.voidremoveEntryReadListener(EntryReadListener listener)Removes an EntryReadListener.voidsetNotifyListeners(boolean notifyListeners)Sets whether this entry reader will notify the listeners once it is over.-
Methods inherited from class org.opends.guitools.controlpanel.util.BackgroundTask
interrupt, isInterrupted, startBackgroundTask
-
-
-
-
Constructor Detail
-
LDAPEntryReader
public LDAPEntryReader(DN dn, ConnectionWithControls conn)
Constructor of the entry reader.- Parameters:
dn- the DN of the entry.conn- the connection to the server.
-
-
Method Detail
-
processBackgroundTask
public Entry processBackgroundTask() throws Throwable
Description copied from class:BackgroundTaskPerforms all processing associated with the task.- Specified by:
processBackgroundTaskin classBackgroundTask<Entry>- Returns:
- An
Objectwith information about the processing performed for this task, ornullif no return value is needed. - Throws:
Throwable- throwable that will be passed through the method backgroundTaskCompleted.
-
backgroundTaskCompleted
public void backgroundTaskCompleted(Entry sr, Throwable throwable)
Description copied from class:BackgroundTaskThis method will be invoked to indicate that the background task has completed. If processing completed successfully, then theThrowableargument will benulland thereturnValueargument will contain the value returned by theprocessBackgroundTaskmethod. If an exception or error was thrown, then thethrowableargument will not benull.- Specified by:
backgroundTaskCompletedin classBackgroundTask<Entry>- Parameters:
sr- The value returned by theprocessBackgroundTaskmethod when processing completed, ornullif no value was returned or an exception was encountered during processing.throwable- AThrowableinstance (e.g., an exception) that was raised during processing, ornullif all processing completed successfully.
-
isNotifyListeners
public boolean isNotifyListeners()
Returns whether this entry reader will notify the listeners once it is over.- Returns:
- whether this entry reader will notify the listeners once it is over.
-
setNotifyListeners
public void setNotifyListeners(boolean notifyListeners)
Sets whether this entry reader will notify the listeners once it is over.- Parameters:
notifyListeners- whether this entry reader will notify the listeners once it is over.
-
isOver
public boolean isOver()
Returnstrueif the read process is over andfalseotherwise.- Returns:
trueif the read process is over andfalseotherwise.
-
addEntryReadListener
public void addEntryReadListener(EntryReadListener listener)
Adds an EntryReadListener.- Parameters:
listener- the listener.
-
removeEntryReadListener
public void removeEntryReadListener(EntryReadListener listener)
Removes an EntryReadListener.- Parameters:
listener- the listener.
-
-