Class IntermediateResponseDecorator<I extends IntermediateResponse>
- java.lang.Object
-
- org.apache.directory.api.ldap.codec.api.MessageDecorator<M>
-
- org.apache.directory.api.ldap.codec.decorators.ResponseDecorator<I>
-
- org.apache.directory.api.ldap.codec.decorators.IntermediateResponseDecorator<I>
-
- All Implemented Interfaces:
Asn1Object
,Decorator<I>
,IntermediateResponse
,Message
,Response
,ResultResponse
- Direct Known Subclasses:
SyncInfoValueDecorator
public class IntermediateResponseDecorator<I extends IntermediateResponse> extends ResponseDecorator<I> implements IntermediateResponse
A decorator for the IntermediateResponse message- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description IntermediateResponseDecorator(LdapApiService codec, I decoratedMessage)
Makes a IntermediateResponse encodable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
computeLength()
Compute the intermediateResponse length
intermediateResponse :ByteBuffer
encode(ByteBuffer buffer)
Encode the IntermediateResponse message to a PDU.String
getResponseName()
Gets the response namebyte[]
getResponseValue()
Gets the ResponseValue.void
setResponseName(String oid)
Sets the response name.void
setResponseValue(byte[] value)
Sets the respponseValue-
Methods inherited from class org.apache.directory.api.ldap.codec.decorators.ResponseDecorator
getLdapResult, setLdapResult
-
Methods inherited from class org.apache.directory.api.ldap.codec.api.MessageDecorator
addAllControls, addControl, get, getCodecService, getControl, getControls, getControlsLength, getCurrentControl, getDecorated, getDecorator, getMessageId, getMessageLength, getType, hasControl, put, removeControl, setControlsLength, setMessageId, setMessageLength, toString
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.Message
addAllControls, addControl, get, getControl, getControls, getMessageId, getType, hasControl, put, removeControl, setMessageId
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.ResultResponse
getLdapResult
-
-
-
-
Constructor Detail
-
IntermediateResponseDecorator
public IntermediateResponseDecorator(LdapApiService codec, I decoratedMessage)
Makes a IntermediateResponse encodable.- Parameters:
codec
- The LDAP service instancedecoratedMessage
- the decorated IntermediateResponse
-
-
Method Detail
-
getResponseName
public String getResponseName()
Gets the response name- Specified by:
getResponseName
in interfaceIntermediateResponse
- Returns:
- the ResponseName OID
-
setResponseName
public void setResponseName(String oid)
Sets the response name.- Specified by:
setResponseName
in interfaceIntermediateResponse
- Parameters:
oid
- the ResponseName
-
getResponseValue
public byte[] getResponseValue()
Gets the ResponseValue.- Specified by:
getResponseValue
in interfaceIntermediateResponse
- Returns:
- the responseValue
-
setResponseValue
public void setResponseValue(byte[] value)
Sets the respponseValue- Specified by:
setResponseValue
in interfaceIntermediateResponse
- Parameters:
value
- The responseValue
-
computeLength
public int computeLength()
Compute the intermediateResponse length
intermediateResponse :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
- Specified by:
computeLength
in interfaceAsn1Object
- Returns:
- The IntermediateResponse length
-
encode
public ByteBuffer encode(ByteBuffer buffer) throws EncoderException
Encode the IntermediateResponse message to a PDU.
IntermediateResponse :0x79 LL [0x80 LL response name] [0x81 LL responseValue]
- Specified by:
encode
in interfaceAsn1Object
- Parameters:
buffer
- The buffer where to put the PDU- Returns:
- The encoded PDU.
- Throws:
EncoderException
- if the buffer can't be encoded
-
-