org.opends.server.controls
Class PagedResultsControl

java.lang.Object
  extended by org.opends.server.types.Control
      extended by org.opends.server.controls.PagedResultsControl

public class PagedResultsControl
extends Control

This class represents a paged results control value as defined in RFC 2696. The searchControlValue is an OCTET STRING wrapping the BER-encoded version of the following SEQUENCE: realSearchControlValue ::= SEQUENCE { size INTEGER (0..maxInt), -- requested page size from client -- result set size estimate from server cookie OCTET STRING }


Constructor Summary
PagedResultsControl(boolean isCritical, ASN1OctetString value)
          Creates a new paged results control by decoding the given information.
PagedResultsControl(boolean isCritical, int size, ASN1OctetString cookie)
          Creates a new paged results control with the specified information.
 
Method Summary
 ASN1OctetString encode()
          Encodes this control value to an ASN.1 element.
 ASN1OctetString getCookie()
          Get the control value cookie element.
 int getSize()
          Get the control value size element, which is either the requested page size from the client, or the result set size estimate from the server.
 
Methods inherited from class org.opends.server.types.Control
getOID, getValue, hasValue, isCritical, setCritical, setOID, setValue, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PagedResultsControl

public PagedResultsControl(boolean isCritical,
                           int size,
                           ASN1OctetString cookie)
Creates a new paged results control with the specified information.

Parameters:
isCritical - Indicates whether this control should be considered critical in processing the request.
size - The size element.
cookie - The cookie element.

PagedResultsControl

public PagedResultsControl(boolean isCritical,
                           ASN1OctetString value)
                    throws LDAPException
Creates a new paged results control by decoding the given information.

Parameters:
isCritical - Indicates whether the control is considered critical in processing the request.
value - The value of the control.
Throws:
LDAPException - If a problem occurs while attempting to decode the provided information as a paged results control.
Method Detail

encode

public ASN1OctetString encode()
Encodes this control value to an ASN.1 element.

Returns:
The ASN.1 element containing the encoded control value.

getSize

public int getSize()
Get the control value size element, which is either the requested page size from the client, or the result set size estimate from the server.

Returns:
The control value size element.

getCookie

public ASN1OctetString getCookie()
Get the control value cookie element.

Returns:
The control value cookie element.