public class PagedResultsControl extends AbstractControl
This control is included in the searchRequest and searchResultDone
messages as part of the controls field of the LDAPMessage, as defined
in Section 4.1.12 of [LDAPv3]. The structure of this control is as
follows:
pagedResultsControl ::= SEQUENCE {
controlType 1.2.840.113556.1.4.319,
criticality BOOLEAN DEFAULT FALSE,
controlValue searchControlValue
}
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
}
| Modifier and Type | Field and Description |
|---|---|
static String |
CONTROL_OID
The Paged Search Control OID
|
decoder, value, valueLengthparent| Constructor and Description |
|---|
PagedResultsControl() |
| Modifier and Type | Method and Description |
|---|---|
int |
computeLength()
Compute the PagedSearchControl length, which is the sum
of the control length and the value length.
|
ByteBuffer |
encode(ByteBuffer buffer)
Encodes the paged search control.
|
byte[] |
getCookie() |
int |
getCookieValue() |
int |
getSize() |
byte[] |
getValue()
Get the control value
|
void |
setCookie(byte[] cookie)
Set the cookie
|
void |
setSize(int size)
Set the number of entry requested or returned
|
String |
toString()
Return a String representing this PagedSearchControl.
|
computeLength, getDecoder, getOid, hasValue, isCritical, setCritical, setValueaddLength, getCurrentLength, getExpectedLength, getParent, getTlvId, setCurrentLength, setExpectedLength, setParentpublic static final String CONTROL_OID
public int computeLength()
PagedSearchControl value length : 0x30 L1 | +--> 0x02 0x0(1-4) [0..2^63-1] (size) +--> 0x04 L2 (cookie)
computeLength in interface Asn1ObjectcomputeLength in interface CodecControlcomputeLength in class AbstractControlpublic ByteBuffer encode(ByteBuffer buffer) throws EncoderException
encode in interface Asn1Objectencode in interface CodecControlencode in class AbstractControlbuffer - The encoded sinkEncoderException - If anything goes wrong.public byte[] getValue()
getValue in interface ControlgetValue in class AbstractControlpublic int getSize()
public void setSize(int size)
size - The number of entriespublic byte[] getCookie()
public void setCookie(byte[] cookie)
cookie - The cookie to store in this controlpublic int getCookieValue()
public String toString()
toString in class AbstractControlCopyright © 2003–2016 The Apache Software Foundation. All rights reserved.