org.ldaptive.control
Class PagedResultsControl

java.lang.Object
  extended by org.ldaptive.control.AbstractControl
      extended by org.ldaptive.control.PagedResultsControl
All Implemented Interfaces:
Control, RequestControl, ResponseControl

public class PagedResultsControl
extends AbstractControl
implements RequestControl, ResponseControl

Request/response control for PagedResults. See RFC 2696. Control is defined as:

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

Version:
$Revision: 3189 $ $Date: 2016-11-01 17:21:43 -0400 (Tue, 01 Nov 2016) $
Author:
Middleware Services

Field Summary
static String OID
          OID of this control.
 
Fields inherited from class org.ldaptive.control.AbstractControl
logger
 
Constructor Summary
PagedResultsControl()
          Default constructor.
PagedResultsControl(boolean critical)
          Creates a new paged results control.
PagedResultsControl(int size)
          Creates a new paged results control.
PagedResultsControl(int size, boolean critical)
          Creates a new paged results control.
PagedResultsControl(int size, byte[] value, boolean critical)
          Creates a new paged results control.
 
Method Summary
 void decode(byte[] berValue)
          Initializes this response control with the supplied BER encoded data.
 byte[] encode()
          Provides the BER encoding of this control.
 boolean equals(Object o)
          
 byte[] getCookie()
          Returns the paged results cookie.
 int getSize()
          Returns the paged results size.
 int hashCode()
          Returns the hash code for this object.
 void setCookie(byte[] value)
          Sets the paged results cookie.
 void setSize(int size)
          Sets the paged results size.
 String toString()
          
 
Methods inherited from class org.ldaptive.control.AbstractControl
getCriticality, getOID
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.ldaptive.control.Control
getCriticality, getOID
 

Field Detail

OID

public static final String OID
OID of this control.

See Also:
Constant Field Values
Constructor Detail

PagedResultsControl

public PagedResultsControl()
Default constructor.


PagedResultsControl

public PagedResultsControl(boolean critical)
Creates a new paged results control.

Parameters:
critical - whether this control is critical

PagedResultsControl

public PagedResultsControl(int size)
Creates a new paged results control.

Parameters:
size - paged results size

PagedResultsControl

public PagedResultsControl(int size,
                           boolean critical)
Creates a new paged results control.

Parameters:
size - paged results size
critical - whether this control is critical

PagedResultsControl

public PagedResultsControl(int size,
                           byte[] value,
                           boolean critical)
Creates a new paged results control.

Parameters:
size - paged results size
value - paged results cookie
critical - whether this control is critical
Method Detail

getSize

public int getSize()
Returns the paged results size. For requests this is the requested page size. For responses this is the result size estimate from the server.

Returns:
paged results size

setSize

public void setSize(int size)
Sets the paged results size. For requests this is the requested page size. For responses this is the result size estimate from the server.

Parameters:
size - paged results size

getCookie

public byte[] getCookie()
Returns the paged results cookie.

Returns:
paged results cookie

setCookie

public void setCookie(byte[] value)
Sets the paged results cookie.

Parameters:
value - paged results cookie

equals

public boolean equals(Object o)

Overrides:
equals in class AbstractControl

hashCode

public int hashCode()
Description copied from class: AbstractControl
Returns the hash code for this object.

Specified by:
hashCode in class AbstractControl
Returns:
hash code

toString

public String toString()

Overrides:
toString in class Object

encode

public byte[] encode()
Provides the BER encoding of this control.

Specified by:
encode in interface RequestControl
Returns:
BER encoded request control

decode

public void decode(byte[] berValue)
Initializes this response control with the supplied BER encoded data.

Specified by:
decode in interface ResponseControl
Parameters:
berValue - BER encoded response control


Copyright © 2003-2017 Virginia Tech. All Rights Reserved.