public class CompareRequestDecorator extends SingleReplyRequestDecorator<CompareRequest> implements CompareRequest
Constructor and Description |
---|
CompareRequestDecorator(LdapApiService codec,
CompareRequest decoratedMessage)
Makes a CompareRequest a MessageDecorator.
|
Modifier and Type | Method and Description |
---|---|
CompareRequest |
addAllControls(Control[] controls)
Adds an array of controls to this Message.
|
CompareRequest |
addControl(Control control)
Adds a control to this Message.
|
int |
computeLength()
Compute the CompareRequest length
CompareRequest : |
ByteBuffer |
encode(ByteBuffer buffer)
Encode the CompareRequest message to a PDU.
|
Value<?> |
getAssertionValue()
Gets the attribute value to use in making the comparison.
|
String |
getAttributeId()
Gets the attribute id use in making the comparison.
|
Dn |
getName()
Gets the distinguished name of the entry to be compared using the
attribute value assertion.
|
CompareRequest |
removeControl(Control control)
Deletes a control removing it from this Message.
|
CompareRequest |
setAssertionValue(byte[] value)
Sets the attribute value to use in the comparison.
|
CompareRequest |
setAssertionValue(String value)
Sets the attribute value to use in the comparison.
|
CompareRequest |
setAttributeId(String attrId)
Sets the attribute id used in the comparison.
|
CompareRequest |
setMessageId(int messageId)
Sets the Message ID for this request
|
CompareRequest |
setName(Dn name)
Sets the distinguished name of the entry to be compared using the
attribute value assertion.
|
abandon, addAbandonListener, getResponseType, isAbandoned
getResultResponse, hasResponse
get, getCodecService, getControl, getControls, getControlsLength, getCurrentControl, getDecorated, getDecorator, getMessageId, getMessageLength, getType, hasControl, put, setControlsLength, setMessageLength, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getResponseType
getResultResponse
hasResponse
get, getControl, getControls, getMessageId, getType, hasControl, put
abandon, addAbandonListener, isAbandoned
public CompareRequestDecorator(LdapApiService codec, CompareRequest decoratedMessage)
codec
- The LDAP service instancedecoratedMessage
- the decorated CompareRequestpublic Dn getName()
getName
in interface CompareRequest
public CompareRequest setName(Dn name)
setName
in interface CompareRequest
name
- the Dn of the compared entry.public Value<?> getAssertionValue()
getAssertionValue
in interface CompareRequest
public CompareRequest setAssertionValue(String value)
setAssertionValue
in interface CompareRequest
value
- the attribute value used in comparison.public CompareRequest setAssertionValue(byte[] value)
setAssertionValue
in interface CompareRequest
value
- the attribute value used in comparison.public String getAttributeId()
getAttributeId
in interface CompareRequest
public CompareRequest setAttributeId(String attrId)
setAttributeId
in interface CompareRequest
attrId
- the attribute id used in comparison.public CompareRequest setMessageId(int messageId)
setMessageId
in interface CompareRequest
setMessageId
in interface Message
setMessageId
in class MessageDecorator<CompareRequest>
messageId
- The message Idpublic CompareRequest addControl(Control control)
addControl
in interface CompareRequest
addControl
in interface Message
addControl
in class MessageDecorator<CompareRequest>
control
- the control to add.public CompareRequest addAllControls(Control[] controls)
addAllControls
in interface CompareRequest
addAllControls
in interface Message
addAllControls
in class MessageDecorator<CompareRequest>
controls
- the controls to add.public CompareRequest removeControl(Control control)
removeControl
in interface CompareRequest
removeControl
in interface Message
removeControl
in class MessageDecorator<CompareRequest>
control
- the control to remove.public int computeLength()
0x6E L1 | +--> 0x04 L2 entry +--> 0x30 L3 (ava) | +--> 0x04 L4 attributeDesc +--> 0x04 L5 assertionValue L3 = Length(0x04) + Length(L4) + L4 + Length(0x04) + Length(L5) + L5 Length(CompareRequest) = Length(0x6E) + Length(L1) + L1 + Length(0x04) + Length(L2) + L2 + Length(0x30) + Length(L3) + L3
computeLength
in interface Asn1Object
computeLength
in interface Decorator<CompareRequest>
public ByteBuffer encode(ByteBuffer buffer) throws EncoderException
CompareRequest : 0x6E LL 0x04 LL entry 0x30 LL attributeValueAssertion 0x04 LL attributeDesc 0x04 LL assertionValue
encode
in interface Asn1Object
encode
in interface Decorator<CompareRequest>
buffer
- The buffer where to put the PDUEncoderException
- if the buffer can't be encodedCopyright © 2003–2018 The Apache Software Foundation. All rights reserved.