public class PagedResultsControl extends AbstractControl implements RequestControl, ResponseControl
realSearchControlValue ::= SEQUENCE { size INTEGER (0..maxInt), -- requested page size from client -- result set size estimate from server cookie OCTET STRING }
Modifier and Type | Class and Description |
---|---|
private static class |
PagedResultsControl.CookieHandler
Parse handler implementation for the cookie.
|
private static class |
PagedResultsControl.SizeHandler
Parse handler implementation for the size.
|
Modifier and Type | Field and Description |
---|---|
private byte[] |
cookie
server generated cookie.
|
private static byte[] |
EMPTY_COOKIE
Empty byte array used for null cookies.
|
private static int |
HASH_CODE_SEED
hash code seed.
|
static String |
OID
OID of this control.
|
private int |
resultSize
paged results size.
|
logger
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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() |
getCriticality, getOID
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getCriticality, getOID
public static final String OID
private static final int HASH_CODE_SEED
private static final byte[] EMPTY_COOKIE
private int resultSize
private byte[] cookie
public PagedResultsControl()
public PagedResultsControl(boolean critical)
critical
- whether this control is criticalpublic PagedResultsControl(int size)
size
- paged results sizepublic PagedResultsControl(int size, boolean critical)
size
- paged results sizecritical
- whether this control is criticalpublic PagedResultsControl(int size, byte[] value, boolean critical)
size
- paged results sizevalue
- paged results cookiecritical
- whether this control is criticalpublic int getSize()
public void setSize(int size)
size
- paged results sizepublic byte[] getCookie()
public void setCookie(byte[] value)
value
- paged results cookiepublic boolean equals(Object o)
equals
in class AbstractControl
public int hashCode()
AbstractControl
hashCode
in class AbstractControl
public byte[] encode()
RequestControl
encode
in interface RequestControl
public void decode(byte[] berValue)
ResponseControl
decode
in interface ResponseControl
berValue
- BER encoded response controlCopyright © 2003-2019 Virginia Tech. All Rights Reserved.