Package org.opends.server.controls
Class PagedResultsControl
- java.lang.Object
-
- org.opends.server.types.Control
-
- 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 }
-
-
Field Summary
Fields Modifier and Type Field Description static ControlDecoder<PagedResultsControl>DECODERThe Control Decoder that can be used to decode this control.
-
Constructor Summary
Constructors Constructor Description PagedResultsControl(boolean isCritical, int size, ByteString cookie)Creates a new paged results control with the specified information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteStringgetCookie()Get the control value cookie element.intgetSize()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.voidwriteValue(ASN1Writer writer)Writes this control's value to an ASN.1 writer.
-
-
-
Field Detail
-
DECODER
public static final ControlDecoder<PagedResultsControl> DECODER
The Control Decoder that can be used to decode this control.
-
-
Constructor Detail
-
PagedResultsControl
public PagedResultsControl(boolean isCritical, int size, ByteString 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.
-
-
Method Detail
-
writeValue
public void writeValue(ASN1Writer writer) throws IOException
Description copied from class:ControlWrites this control's value to an ASN.1 writer. The value (if any) must be written as an ASN1OctetString.- Specified by:
writeValuein classControl- Parameters:
writer- The ASN.1 writer to use.- Throws:
IOException- If a problem occurs while writing to the stream.
-
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 ByteString getCookie()
Get the control value cookie element.- Returns:
- The control value cookie element.
-
-