R
- The extended response to decoratepublic class ExtendedResponseDecorator<R extends ExtendedResponse> extends ResponseDecorator<R> implements ExtendedResponse
TYPE
Constructor and Description |
---|
ExtendedResponseDecorator(LdapApiService codec,
R decoratedMessage)
Makes a ExtendedResponse encodable.
|
Modifier and Type | Method and Description |
---|---|
int |
computeLength()
Compute the ExtendedResponse length
ExtendedResponse : |
ByteBuffer |
encode(ByteBuffer buffer)
Encode the ExtendedResponse message to a PDU.
|
String |
getResponseName()
Gets the OID uniquely identifying this extended response (a.k.a.
|
byte[] |
getResponseValue()
Gets the Extended response payload
|
void |
setResponseName(String oid)
Sets the OID uniquely identifying this extended response (a.k.a.
|
void |
setResponseValue(byte[] responseValue)
sets the Extended response payload
|
getLdapResult, setLdapResult
addAllControls, addControl, get, getCodecService, getControl, getControls, getControlsLength, getCurrentControl, getDecorated, getDecorator, getMessageId, getMessageLength, getType, hasControl, put, removeControl, setControlsLength, setMessageId, setMessageLength, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getLdapResult
addAllControls, addControl, get, getControl, getControls, getMessageId, getType, hasControl, put, removeControl, setMessageId
public ExtendedResponseDecorator(LdapApiService codec, R decoratedMessage)
codec
- The LDAP service instancedecoratedMessage
- the decorated ExtendedResponsepublic String getResponseName()
getResponseName
in interface ExtendedResponse
public void setResponseName(String oid)
setResponseName
in interface ExtendedResponse
oid
- the OID of the extended response type.public byte[] getResponseValue()
public void setResponseValue(byte[] responseValue)
responseValue
- The extended payloadpublic int computeLength()
0x78 L1 | +--> LdapResult [+--> 0x8A L2 name [+--> 0x8B L3 response]] L1 = Length(LdapResult) [ + Length(0x8A) + Length(L2) + L2 [ + Length(0x8B) + Length(L3) + L3]] Length(ExtendedResponse) = Length(0x78) + Length(L1) + L1
computeLength
in interface Asn1Object
computeLength
in interface Decorator<R extends ExtendedResponse>
public ByteBuffer encode(ByteBuffer buffer) throws EncoderException
LdapResult.encode() [0x8A LL response name] [0x8B LL response]
encode
in interface Asn1Object
encode
in interface Decorator<R extends ExtendedResponse>
buffer
- The buffer where to put the PDUEncoderException
- if the buffer can't be encodedCopyright © 2003–2018 The Apache Software Foundation. All rights reserved.