Class CompareResponseDecorator
- java.lang.Object
-
- org.apache.directory.api.ldap.codec.api.MessageDecorator<M>
-
- org.apache.directory.api.ldap.codec.decorators.ResponseDecorator<CompareResponse>
-
- org.apache.directory.api.ldap.codec.decorators.CompareResponseDecorator
-
- All Implemented Interfaces:
Asn1Object
,Decorator<CompareResponse>
,CompareResponse
,Message
,Response
,ResultResponse
public class CompareResponseDecorator extends ResponseDecorator<CompareResponse> implements CompareResponse
A decorator for the CompareResponse message- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description CompareResponseDecorator(LdapApiService codec, CompareResponse decoratedMessage)
Makes a CompareResponse a MessageDecorator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
computeLength()
Compute the CompareResponse length
CompareResponse :ByteBuffer
encode(ByteBuffer buffer)
Encode the CompareResponse message to a PDU.boolean
isTrue()
-
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
-
CompareResponseDecorator
public CompareResponseDecorator(LdapApiService codec, CompareResponse decoratedMessage)
Makes a CompareResponse a MessageDecorator.- Parameters:
codec
- The LDAP service instancedecoratedMessage
- the decorated CompareResponse
-
-
Method Detail
-
isTrue
public boolean isTrue()
- Specified by:
isTrue
in interfaceCompareResponse
- Returns:
- true if the compare response is TRUE, false otherwise
-
computeLength
public int computeLength()
Compute the CompareResponse length
CompareResponse :0x6F L1 | +--> LdapResult L1 = Length(LdapResult) Length(CompareResponse) = Length(0x6F) + Length(L1) + L1
- Specified by:
computeLength
in interfaceAsn1Object
- Returns:
- The object's computed length
-
encode
public ByteBuffer encode(ByteBuffer buffer) throws EncoderException
Encode the CompareResponse message to a PDU.- 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
-
-