com.sun.jndi.ldap.ctl
Class PagedResultsResponseControl

java.lang.Object
  extended by com.sun.jndi.ldap.BasicControl
      extended by com.sun.jndi.ldap.ctl.PagedResultsResponseControl
All Implemented Interfaces:
java.io.Serializable, javax.naming.ldap.Control

public final class PagedResultsResponseControl
extends com.sun.jndi.ldap.BasicControl

This class implements the LDAPv3 Response Control for paged-results as defined in RFC-2696. The control's value has the following ASN.1 definition:


     realSearchControlValue ::= SEQUENCE {
         size      INTEGER (0..maxInt),
                           -- requested page size from client
                           -- result set size estimate from server
         cookie    OCTET STRING
     }

 

Author:
Vincent Ryan
See Also:
PagedResultsControl, Serialized Form

Field Summary
private  byte[] cookie
          A server-generated cookie.
static java.lang.String OID
          The paged-results response control's assigned object identifier is 1.2.840.113556.1.4.319.
private  int resultSize
          An estimate of the number of entries in the search result.
private static long serialVersionUID
           
 
Fields inherited from class com.sun.jndi.ldap.BasicControl
criticality, id, value
 
Fields inherited from interface javax.naming.ldap.Control
CRITICAL, NONCRITICAL
 
Constructor Summary
PagedResultsResponseControl(java.lang.String id, boolean criticality, byte[] value)
          Constructs a paged-results response control.
 
Method Summary
 byte[] getCookie()
           
 int getResultSize()
          Retrieves (an estimate of) the number of entries in the search result.
 
Methods inherited from class com.sun.jndi.ldap.BasicControl
getEncodedValue, getID, isCritical
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OID

public static final java.lang.String OID
The paged-results response control's assigned object identifier is 1.2.840.113556.1.4.319.

See Also:
Constant Field Values

resultSize

private int resultSize
An estimate of the number of entries in the search result.


cookie

private byte[] cookie
A server-generated cookie.


serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

PagedResultsResponseControl

public PagedResultsResponseControl(java.lang.String id,
                                   boolean criticality,
                                   byte[] value)
                            throws java.io.IOException
Constructs a paged-results response control.

Parameters:
id - The control's object identifier string.
criticality - The control's criticality.
value - The control's ASN.1 BER encoded value.
Throws:
java.io.IOException - if an error is encountered while decoding the control's value.
Method Detail

getResultSize

public int getResultSize()
Retrieves (an estimate of) the number of entries in the search result.

Returns:
The number of entries in the search result, or zero if unknown.

getCookie

public byte[] getCookie()