public class SortRequestDecorator extends ControlDecorator<SortRequest> implements SortRequest
| Modifier and Type | Field and Description |
|---|---|
static int |
ORDERING_RULE_TAG |
static int |
REVERSE_ORDER_TAG |
value, valueLengthOID| Constructor and Description |
|---|
SortRequestDecorator(LdapApiService codec)
Creates a new instance of SortRequestDecorator.
|
SortRequestDecorator(LdapApiService codec,
SortRequest control)
Creates a new instance of SortRequestDecorator.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSortKey(SortKey sortKey)
adds a sort key
|
int |
computeLength()
Compute the object length, which is the sum of all inner length.
|
Asn1Object |
decode(byte[] controlBytes)
Decodes raw ASN.1 encoded bytes into an Asn1Object for the control.
|
ByteBuffer |
encode(ByteBuffer buffer)
Encode the object to a PDU.
|
List<SortKey> |
getSortKeys() |
byte[] |
getValue()
Get the control value
|
void |
setSortKeys(List<SortKey> sortKeys)
sets the sort keys
|
equals, getCodecService, getDecorated, getOid, hashCode, hasValue, isCritical, setCritical, setDecorated, setValue, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetOid, isCritical, setCriticalpublic static final int ORDERING_RULE_TAG
public static final int REVERSE_ORDER_TAG
public SortRequestDecorator(LdapApiService codec)
codec - the LDAP codecpublic SortRequestDecorator(LdapApiService codec, SortRequest control)
codec - the LDAP codeccontrol - the control instancepublic int computeLength()
ControlDecoratorcomputeLength in interface Asn1ObjectcomputeLength in interface Decorator<SortRequest>computeLength in class ControlDecorator<SortRequest>public ByteBuffer encode(ByteBuffer buffer) throws EncoderException
Decoratorencode in interface Asn1Objectencode in interface Decorator<SortRequest>buffer - The buffer where to put the PDUEncoderException - if the buffer can't be encodedpublic Asn1Object decode(byte[] controlBytes) throws DecoderException
CodecControldecode in interface CodecControl<SortRequest>controlBytes - the encoded control bytesDecoderException - if anything goes wrongpublic byte[] getValue()
getValue in interface CodecControl<SortRequest>getValue in class ControlDecorator<SortRequest>public void setSortKeys(List<SortKey> sortKeys)
SortRequestsetSortKeys in interface SortRequestpublic List<SortKey> getSortKeys()
getSortKeys in interface SortRequestpublic void addSortKey(SortKey sortKey)
SortRequestaddSortKey in interface SortRequestCopyright © 2021. All rights reserved.