public class IntermediateResponseDecorator extends MessageDecorator<IntermediateResponse> implements IntermediateResponse
TYPE
Constructor and Description |
---|
IntermediateResponseDecorator(LdapApiService codec,
IntermediateResponse decoratedMessage)
Makes a IntermediateResponse encodable.
|
Modifier and Type | Method and Description |
---|---|
int |
computeLength()
Compute the intermediateResponse length
intermediateResponse : |
ByteBuffer |
encode(ByteBuffer buffer)
Encode the IntermediateResponse message to a PDU.
|
String |
getResponseName()
Gets the response name
|
byte[] |
getResponseValue()
Gets the ResponseValue.
|
void |
setResponseName(String oid)
Sets the response name.
|
void |
setResponseValue(byte[] value)
Sets the respponseValue
|
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
addAllControls, addControl, get, getControl, getControls, getMessageId, getType, hasControl, put, removeControl, setMessageId
public IntermediateResponseDecorator(LdapApiService codec, IntermediateResponse decoratedMessage)
codec
- The LDAP service instancedecoratedMessage
- the decorated IntermediateResponsepublic String getResponseName()
getResponseName
in interface IntermediateResponse
public void setResponseName(String oid)
setResponseName
in interface IntermediateResponse
oid
- the ResponseNamepublic byte[] getResponseValue()
getResponseValue
in interface IntermediateResponse
public void setResponseValue(byte[] value)
setResponseValue
in interface IntermediateResponse
value
- The responseValuepublic int computeLength()
0x79 L1 | [+--> 0x80 L2 name [+--> 0x81 L3 response]] L1 = [ + Length(0x80) + Length(L2) + L2 [ + Length(0x81) + Length(L3) + L3]] Length(IntermediateResponse) = Length(0x79) + Length(L1) + L1
computeLength
in interface Asn1Object
computeLength
in interface Decorator<IntermediateResponse>
public ByteBuffer encode(ByteBuffer buffer) throws EncoderException
0x79 LL [0x80 LL response name] [0x81 LL responseValue]
encode
in interface Asn1Object
encode
in interface Decorator<IntermediateResponse>
buffer
- The buffer where to put the PDUEncoderException
- if the buffer can't be encodedCopyright © 2003–2018 The Apache Software Foundation. All rights reserved.