Class 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 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: BackgroundTask
        Performs all processing associated with the task.
        Specified by:
        processBackgroundTask in class BackgroundTask<Entry>
        Returns:
        An Object with information about the processing performed for this task, or null if 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: BackgroundTask
        This method will be invoked to indicate that the background task has completed. If processing completed successfully, then the 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.
        Specified by:
        backgroundTaskCompleted in class BackgroundTask<Entry>
        Parameters:
        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.
      • 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()
        Returns true if the read process is over and false otherwise.
        Returns:
        true if the read process is over and false otherwise.
      • 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.