All LDAP Classes
Internal LDAP Classes

com.novell.ldap
Class DSMLSearchResults

java.lang.Object
  extended by com.novell.ldap.LDAPSearchResults
      extended by com.novell.ldap.DSMLSearchResults
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable

public class DSMLSearchResults
extends LDAPSearchResults

Author:
Marc Boorshtein Used as a drop-in replacement for LDAPSerchResults
See Also:
Serialized Form

Field Summary
(package private)  LDAPControl[] controls
          The returned controls
(package private)  boolean empty
          Are there no results?
(package private)  LDAPMessage lastread
          The last read message
(package private)  int msgRespPtr
          The response pointer
private  LDAPReader reader
          The Reader
(package private)  boolean wasRead
          Have any results been read?
 
Constructor Summary
DSMLSearchResults()
           
DSMLSearchResults(LDAPReader reader)
           
 
Method Summary
(package private)  void abandon()
          Cancels the search request and clears the message and enumeration.
 int getCount()
          Returns a count of the items in the search result.
 LDAPControl[] getResponseControls()
          Returns the latest server controls returned by the server in the context of this search request, or null if no server controls were returned.
 boolean hasMore()
          Reports if there are more search results.
 LDAPEntry next()
          Returns the next result as an LDAPEntry.
 
Methods inherited from class com.novell.ldap.LDAPSearchResults
getDeSerializedControls, getDeSerializedEntries, getXMLControlHandler, getXMLEntryHandler, readDSML, readExternal, writeExternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

controls

LDAPControl[] controls
The returned controls


msgRespPtr

int msgRespPtr
The response pointer


reader

private LDAPReader reader
The Reader


lastread

LDAPMessage lastread
The last read message


empty

boolean empty
Are there no results?


wasRead

boolean wasRead
Have any results been read?

Constructor Detail

DSMLSearchResults

public DSMLSearchResults(LDAPReader reader)

DSMLSearchResults

public DSMLSearchResults()
Method Detail

abandon

void abandon()
Description copied from class: LDAPSearchResults
Cancels the search request and clears the message and enumeration.

Overrides:
abandon in class LDAPSearchResults

getCount

public int getCount()
Description copied from class: LDAPSearchResults
Returns a count of the items in the search result.

Returns a count of the entries and exceptions remaining in the object. If the search was submitted with a batch size greater than zero, getCount reports the number of results received so far but not enumerated with next(). The behavior is same for search submitted with batch size equals to 0.

For blocking calls with batch size equals to 0, get count returns the count of all the expected results from search for first time once after enumerated with hasMore(). The subsequent iterations decrement count value for both blocking and non-blocking calls.

Overrides:
getCount in class LDAPSearchResults
Returns:
The number of items received but not retrieved by the application

getResponseControls

public LDAPControl[] getResponseControls()
Description copied from class: LDAPSearchResults
Returns the latest server controls returned by the server in the context of this search request, or null if no server controls were returned.

Overrides:
getResponseControls in class LDAPSearchResults
Returns:
The server controls returned with the search request, or null if none were returned.

hasMore

public boolean hasMore()
Description copied from class: LDAPSearchResults
Reports if there are more search results.

Overrides:
hasMore in class LDAPSearchResults
Returns:
true if there are more search results.

next

public LDAPEntry next()
               throws LDAPException
Description copied from class: LDAPSearchResults
Returns the next result as an LDAPEntry.

If automatic referral following is disabled or if a referral was not followed, next() will throw an LDAPReferralException when the referral is received.

Overrides:
next in class LDAPSearchResults
Returns:
The next search result as an LDAPEntry.
Throws:
LDAPException - A general exception which includes an error message and an LDAP error code.
LDAPReferralException - A referral was received and not followed.

All LDAP Classes
Internal LDAP Classes

Copyright ? 2002 Novell, Inc. All Rights Reserved.
Novell, Inc.
1800 South Novell Place
Provo, Ut 84606
Phone: (801) 861-5000