public class PagedResultsDecorator extends ControlDecorator<PagedResults> implements PagedResults
PagedResultsImpl
.value, valueLength
OID
Constructor and Description |
---|
PagedResultsDecorator(LdapApiService codec)
Creates a new instance of PagedResultsDecorator with a newly created decorated
PagedResults Control.
|
PagedResultsDecorator(LdapApiService codec,
PagedResults pagedResults)
Creates a new instance of PagedResultsDecorator using the supplied PagedResults
Control to be decorated.
|
Modifier and Type | Method and Description |
---|---|
int |
computeLength()
Compute the PagedSearchControl length, which is the sum
of the control length and the value length.
|
Asn1Object |
decode(byte[] controlBytes)
Decodes raw ASN.1 encoded bytes into an Asn1Object for the control.
|
ByteBuffer |
encode(ByteBuffer buffer)
Encodes the paged search control.
|
boolean |
equals(Object o) |
byte[] |
getCookie() |
int |
getCookieValue() |
int |
getSize() |
byte[] |
getValue()
Get the control value
|
int |
hashCode() |
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.
|
getCodecService, getDecorated, getOid, hasValue, isCritical, setCritical, setDecorated, setValue
addLength, getCurrentLength, getExpectedLength, getParent, getTlvId, setCurrentLength, setExpectedLength, setParent
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getOid, isCritical, setCritical
public PagedResultsDecorator(LdapApiService codec)
public PagedResultsDecorator(LdapApiService codec, PagedResults pagedResults)
pagedResults
- The PagedResults Control to be decorated.public int computeLength()
PagedSearchControl value length : 0x30 L1 | +--> 0x02 0x0(1-4) [0..2^63-1] (size) +--> 0x04 L2 (cookie)
computeLength
in interface Asn1Object
computeLength
in interface Decorator<PagedResults>
computeLength
in class ControlDecorator<PagedResults>
public ByteBuffer encode(ByteBuffer buffer) throws EncoderException
encode
in interface Asn1Object
encode
in interface Decorator<PagedResults>
encode
in class AbstractAsn1Object
buffer
- The encoded sinkEncoderException
- If anything goes wrong.public byte[] getValue()
getValue
in interface CodecControl<PagedResults>
getValue
in class ControlDecorator<PagedResults>
public int getSize()
getSize
in interface PagedResults
public void setSize(int size)
setSize
in interface PagedResults
size
- The number of entriespublic byte[] getCookie()
getCookie
in interface PagedResults
public void setCookie(byte[] cookie)
setCookie
in interface PagedResults
cookie
- The cookie to store in this controlpublic int getCookieValue()
getCookieValue
in interface PagedResults
public int hashCode()
hashCode
in class ControlDecorator<PagedResults>
Object.hashCode()
public boolean equals(Object o)
equals
in class ControlDecorator<PagedResults>
Object.equals(Object)
public String toString()
toString
in class ControlDecorator<PagedResults>
public Asn1Object decode(byte[] controlBytes) throws DecoderException
decode
in interface CodecControl<PagedResults>
controlBytes
- the encoded control bytesDecoderException
- if anything goes wrongCopyright © 2003-2014 The Apache Software Foundation. All Rights Reserved.