Package org.ldaptive.provider.jldap
Class JLdapConnection.SearchResultIterator
- java.lang.Object
-
- org.ldaptive.provider.jldap.JLdapConnection.SearchResultIterator
-
- Enclosing class:
- JLdapConnection
protected static class JLdapConnection.SearchResultIterator extends Object
Iterates over an ldap search queue.
-
-
Field Summary
Fields Modifier and Type Field Description private com.novell.ldap.LDAPMessagemessageLast response message received from the queue.private com.novell.ldap.LDAPSearchQueuequeueQueue to iterate over.private com.novell.ldap.LDAPResponseresponseResponse available after all messages have been received.
-
Constructor Summary
Constructors Constructor Description SearchResultIterator(com.novell.ldap.LDAPSearchQueue q)Create a new ldap result iterator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.novell.ldap.LDAPSearchQueuegetLDAPSearchQueue()Returns the search queue used by this iterator.com.novell.ldap.LDAPResponsegetResponse()Returns the search response.booleanhasNext()Returns whether the queue has another message to read.com.novell.ldap.LDAPMessagenext()Returns the next message in the queue.
-
-
-
Field Detail
-
queue
private final com.novell.ldap.LDAPSearchQueue queue
Queue to iterate over.
-
message
private com.novell.ldap.LDAPMessage message
Last response message received from the queue.
-
response
private com.novell.ldap.LDAPResponse response
Response available after all messages have been received.
-
-
Method Detail
-
getLDAPSearchQueue
public com.novell.ldap.LDAPSearchQueue getLDAPSearchQueue()
Returns the search queue used by this iterator.- Returns:
- ldap search queue
-
hasNext
public boolean hasNext() throws com.novell.ldap.LDAPExceptionReturns whether the queue has another message to read.- Returns:
- whether the queue has another message to read
- Throws:
com.novell.ldap.LDAPException- if an error occurs reading the response
-
next
public com.novell.ldap.LDAPMessage next()
Returns the next message in the queue.- Returns:
- ldap message
-
getResponse
public com.novell.ldap.LDAPResponse getResponse()
Returns the search response. Available after all messages have been read from the queue.- Returns:
- ldap search response
-
-