Class LDAPSearchResults

    • Constructor Summary

      Constructors 
      Constructor Description
      LDAPSearchResults()
      Creates a new LDAP search results object.
      LDAPSearchResults​(long maxWaitTime)
      Creates a new LDAP search results object with the specified maximum wait time.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getCount()
      Retrieves the number of results that are available for immediate processing.
      LDAPControl[] getResponseControls()
      Retrieves the response controls for the last result element returned, or for the search itself if the search has completed.
      boolean hasMoreElements()
      Indicates whether there are any more search results to return.
      LDAPEntry next()
      Retrieves the next entry from the set of search results.
      java.lang.Object nextElement()
      Retrieves the next element in the set of search results.
      void searchEntryReturned​(SearchResultEntry searchEntry)
      Indicates that the provided search result entry has been returned by the server and may be processed by this search result listener.
      void searchReferenceReturned​(SearchResultReference searchReference)
      Indicates that the provided search result reference has been returned by the server and may be processed by this search result listener.
      void searchResultReceived​(AsyncRequestID requestID, SearchResult searchResult)
      Indicates that the provided search result has been received in response to an asynchronous search operation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Enumeration

        asIterator
    • Constructor Detail

      • LDAPSearchResults

        public LDAPSearchResults()
        Creates a new LDAP search results object.
      • LDAPSearchResults

        public LDAPSearchResults​(long maxWaitTime)
        Creates a new LDAP search results object with the specified maximum wait time.
        Parameters:
        maxWaitTime - The maximum wait time in milliseconds.
    • Method Detail

      • hasMoreElements

        public boolean hasMoreElements()
        Indicates whether there are any more search results to return.
        Specified by:
        hasMoreElements in interface java.util.Enumeration<java.lang.Object>
        Returns:
        true if there are more search results to return, or false if not.
      • nextElement

        public java.lang.Object nextElement()
                                     throws java.util.NoSuchElementException
        Retrieves the next element in the set of search results.
        Specified by:
        nextElement in interface java.util.Enumeration<java.lang.Object>
        Returns:
        The next element in the set of search results.
        Throws:
        java.util.NoSuchElementException - If there are no more results.
      • next

        public LDAPEntry next()
                       throws LDAPException
        Retrieves the next entry from the set of search results.
        Returns:
        The next entry from the set of search results.
        Throws:
        LDAPException - If there are no more elements to return, or if the next element in the set of results is not an entry.
      • getCount

        public int getCount()
        Retrieves the number of results that are available for immediate processing.
        Returns:
        The number of results that are available for immediate processing.
      • getResponseControls

        public LDAPControl[] getResponseControls()
        Retrieves the response controls for the last result element returned, or for the search itself if the search has completed.
        Returns:
        The response controls for the last result element returned, or null if no elements have yet been returned or if the last element did not include any controls.
      • searchResultReceived

        @InternalUseOnly
        public void searchResultReceived​(AsyncRequestID requestID,
                                         SearchResult searchResult)
        Indicates that the provided search result has been received in response to an asynchronous search operation. Note that automatic referral following is not supported for asynchronous operations, so it is possible that this result could include a referral.
        Specified by:
        searchResultReceived in interface AsyncSearchResultListener
        Parameters:
        requestID - The async request ID of the request for which the response was received.
        searchResult - The search result that has been received.