|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.shared.asn1.AbstractAsn1Object
org.apache.directory.shared.ldap.codec.controls.ControlDecorator<PagedResults>
org.apache.directory.shared.ldap.codec.controls.search.pagedSearch.PagedResultsDecorator
public class PagedResultsDecorator
A codec decorator for the PagedResultsImpl.
| Field Summary |
|---|
| Fields inherited from class org.apache.directory.shared.ldap.codec.controls.ControlDecorator |
|---|
value, valueLength |
| Fields inherited from interface org.apache.directory.shared.ldap.model.message.controls.PagedResults |
|---|
OID |
| Constructor Summary | |
|---|---|
PagedResultsDecorator(LdapCodecService codec)
Creates a new instance of PagedResultsDecorator with a newly created decorated PagedResults Control. |
|
PagedResultsDecorator(LdapCodecService codec,
PagedResults pagedResults)
Creates a new instance of PagedResultsDecorator using the supplied PagedResults Control to be decorated. |
|
| Method Summary | |
|---|---|
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 |
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. |
| Methods inherited from class org.apache.directory.shared.ldap.codec.controls.ControlDecorator |
|---|
getCodecService, getDecorated, getOid, hashCode, hasValue, isCritical, setCritical, setDecorated, setValue |
| Methods inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object |
|---|
addLength, getCurrentLength, getExpectedLength, getParent, getTlvId, setCurrentLength, setExpectedLength, setParent |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.directory.shared.ldap.model.message.Control |
|---|
getOid, isCritical, setCritical |
| Constructor Detail |
|---|
public PagedResultsDecorator(LdapCodecService codec)
public PagedResultsDecorator(LdapCodecService codec,
PagedResults pagedResults)
pagedResults - The PagedResults Control to be decorated.| Method Detail |
|---|
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 Decorator<PagedResults>computeLength in class ControlDecorator<PagedResults>
public ByteBuffer encode(ByteBuffer buffer)
throws EncoderException
encode in interface Asn1Objectencode in interface Decorator<PagedResults>encode in class AbstractAsn1Objectbuffer - The encoded sink
EncoderException - If anything goes wrong.public byte[] getValue()
getValue in interface CodecControl<PagedResults>getValue in class ControlDecorator<PagedResults>public int getSize()
getSize in interface PagedResultspublic void setSize(int size)
setSize in interface PagedResultssize - The number of entriespublic byte[] getCookie()
getCookie in interface PagedResultspublic void setCookie(byte[] cookie)
setCookie in interface PagedResultscookie - The cookie to store in this controlpublic int getCookieValue()
getCookieValue in interface PagedResultspublic 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 bytes
DecoderException - if anything goes wrong
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||