@Mutable @NotExtensible @ThreadSafety(level=NOT_THREADSAFE) public class LDAPSearchResults extends java.lang.Object implements java.util.Enumeration<java.lang.Object>, AsyncSearchResultListener
SearchResult class
should be used instead.| Constructor and 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.
|
| Modifier and Type | Method and 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.
|
public LDAPSearchResults()
public LDAPSearchResults(long maxWaitTime)
maxWaitTime - The maximum wait time in milliseconds.public boolean hasMoreElements()
hasMoreElements in interface java.util.Enumeration<java.lang.Object>true if there are more search results to return, or
false if not.@NotNull public java.lang.Object nextElement() throws java.util.NoSuchElementException
nextElement in interface java.util.Enumeration<java.lang.Object>java.util.NoSuchElementException - If there are no more results.@NotNull public LDAPEntry next() throws LDAPException
LDAPException - If there are no more elements to return, or if
the next element in the set of results is not an
entry.public int getCount()
@Nullable public LDAPControl[] getResponseControls()
null if no elements have yet been returned or if the last
element did not include any controls.@InternalUseOnly public void searchEntryReturned(@NotNull SearchResultEntry searchEntry)
searchEntryReturned in interface SearchResultListenersearchEntry - The search result entry that has been returned by the
server.@InternalUseOnly public void searchReferenceReturned(@NotNull SearchResultReference searchReference)
searchReferenceReturned in interface SearchResultListenersearchReference - The search result reference that has been returned
by the server.@InternalUseOnly public void searchResultReceived(@NotNull AsyncRequestID requestID, @NotNull SearchResult searchResult)
searchResultReceived in interface AsyncSearchResultListenerrequestID - The async request ID of the request for which the
response was received.searchResult - The search result that has been received.