public class SortResponseDecorator extends ControlDecorator<SortResponse> implements SortResponse
OID
Constructor and Description |
---|
SortResponseDecorator(LdapApiService codec)
Creates a new instance of SortResponseDecorator.
|
SortResponseDecorator(LdapApiService codec,
SortResponse control)
Creates a new instance of SortResponseDecorator.
|
Modifier and Type | Method and Description |
---|---|
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.
|
String |
getAttributeName() |
SortResultCode |
getSortResult() |
byte[] |
getValue()
Get the control value
|
void |
setAttributeName(String attributeName)
Sets the name of the first offending attribute
|
void |
setSortResult(SortResultCode result)
sets the sort result
|
equals, getCodecService, getDecorated, getOid, hashCode, hasValue, isCritical, setCritical, setDecorated, setValue, toString
getOid, isCritical, setCritical
public SortResponseDecorator(LdapApiService codec)
codec
- the LDAP codecpublic SortResponseDecorator(LdapApiService codec, SortResponse control)
codec
- the LDAP codeccontrol
- the sort response controlpublic int computeLength()
ControlDecorator
computeLength
in interface Asn1Object
computeLength
in interface Decorator<SortResponse>
computeLength
in class ControlDecorator<SortResponse>
public ByteBuffer encode(ByteBuffer buffer) throws EncoderException
Decorator
encode
in interface Asn1Object
encode
in interface Decorator<SortResponse>
buffer
- The buffer where to put the PDUEncoderException
- if the buffer can't be encodedpublic Asn1Object decode(byte[] controlBytes) throws DecoderException
decode
in interface CodecControl<SortResponse>
controlBytes
- the encoded control bytesDecoderException
- if anything goes wrongpublic byte[] getValue()
getValue
in interface CodecControl<SortResponse>
getValue
in class ControlDecorator<SortResponse>
public void setSortResult(SortResultCode result)
SortResponse
setSortResult
in interface SortResponse
result
- The sort result codepublic SortResultCode getSortResult()
getSortResult
in interface SortResponse
public void setAttributeName(String attributeName)
SortResponse
setAttributeName
in interface SortResponse
attributeName
- The attribute's namepublic String getAttributeName()
getAttributeName
in interface SortResponse
Copyright © 2003–2018 The Apache Software Foundation. All rights reserved.