Class LDAPSearchResults
java.lang.Object
com.unboundid.ldap.sdk.migrate.ldapjdk.LDAPSearchResults
- All Implemented Interfaces:
AsyncSearchResultListener,SearchResultListener,Serializable,Enumeration<Object>
@Mutable
@NotExtensible
@ThreadSafety(level=NOT_THREADSAFE)
public class LDAPSearchResults
extends Object
implements Enumeration<Object>, AsyncSearchResultListener
This class provides a data structure that provides access to data returned
in response to a search operation.
This class is primarily intended to be used in the process of updating applications which use the Netscape Directory SDK for Java to switch to or coexist with the UnboundID LDAP SDK for Java. For applications not written using the Netscape Directory SDK for Java, the
This class is primarily intended to be used in the process of updating applications which use the Netscape Directory SDK for Java to switch to or coexist with the UnboundID LDAP SDK for Java. For applications not written using the Netscape Directory SDK for Java, the
SearchResult class
should be used instead.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new LDAP search results object.LDAPSearchResults(long maxWaitTime) Creates a new LDAP search results object with the specified maximum wait time. -
Method Summary
Modifier and TypeMethodDescriptionintgetCount()Retrieves the number of results that are available for immediate processing.Retrieves the response controls for the last result element returned, or for the search itself if the search has completed.booleanIndicates whether there are any more search results to return.next()Retrieves the next entry from the set of search results.Retrieves the next element in the set of search results.voidsearchEntryReturned(SearchResultEntry searchEntry) Indicates that the provided search result entry has been returned by the server and may be processed by this search result listener.voidsearchReferenceReturned(SearchResultReference searchReference) Indicates that the provided search result reference has been returned by the server and may be processed by this search result listener.voidsearchResultReceived(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, waitMethods inherited from interface java.util.Enumeration
asIterator
-
Constructor Details
-
LDAPSearchResults
public LDAPSearchResults()Creates a new LDAP search results object. -
LDAPSearchResults
Creates a new LDAP search results object with the specified maximum wait time.- Parameters:
maxWaitTime- The maximum wait time in milliseconds.
-
-
Method Details
-
hasMoreElements
Indicates whether there are any more search results to return.- Specified by:
hasMoreElementsin interfaceEnumeration<Object>- Returns:
trueif there are more search results to return, orfalseif not.
-
nextElement
Retrieves the next element in the set of search results.- Specified by:
nextElementin interfaceEnumeration<Object>- Returns:
- The next element in the set of search results.
- Throws:
NoSuchElementException- If there are no more results.
-
next
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
Retrieves the number of results that are available for immediate processing.- Returns:
- The number of results that are available for immediate processing.
-
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
nullif no elements have yet been returned or if the last element did not include any controls.
-
searchEntryReturned
Indicates that the provided search result entry has been returned by the server and may be processed by this search result listener.- Specified by:
searchEntryReturnedin interfaceSearchResultListener- Parameters:
searchEntry- The search result entry that has been returned by the server.
-
searchReferenceReturned
@InternalUseOnly public void searchReferenceReturned(@NotNull SearchResultReference searchReference) Indicates that the provided search result reference has been returned by the server and may be processed by this search result listener.- Specified by:
searchReferenceReturnedin interfaceSearchResultListener- Parameters:
searchReference- The search result reference that has been returned by the server.
-
searchResultReceived
@InternalUseOnly public void searchResultReceived(@NotNull AsyncRequestID requestID, @NotNull 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:
searchResultReceivedin interfaceAsyncSearchResultListener- Parameters:
requestID- The async request ID of the request for which the response was received.searchResult- The search result that has been received.
-