public final class AddRequestDecorator extends SingleReplyRequestDecorator<AddRequest> implements AddRequest
messageLength
Constructor and Description |
---|
AddRequestDecorator(LdapApiService codec,
AddRequest decoratedMessage)
Makes a AddRequest a MessageDecorator.
|
Modifier and Type | Method and Description |
---|---|
AddRequest |
addAllControls(Control[] controls)
Adds an array of controls to this Message.
|
void |
addAttributeType(String type)
Create a new attributeValue
|
void |
addAttributeValue(byte[] value)
Add a new value to the current attribute
|
void |
addAttributeValue(String value)
Add a new value to the current attribute
|
void |
addAttributeValue(Value<?> value)
Add a new value to the current attribute
|
AddRequest |
addControl(Control control)
Adds a control to this Message.
|
int |
computeLength()
Compute the AddRequest length
AddRequest :
0x68 L1
|
+--> 0x04 L2 entry
+--> 0x30 L3 (attributes)
|
+--> 0x30 L4-1 (attribute)
| |
| +--> 0x04 L5-1 type
| +--> 0x31 L6-1 (values)
| |
| +--> 0x04 L7-1-1 value
| +--> ...
|
ByteBuffer |
encode(ByteBuffer buffer)
Encode the AddRequest message to a PDU.
|
int |
getAddRequestLength() |
List<Integer> |
getAttributesLength() |
String |
getCurrentAttributeType() |
Entry |
getEntry()
Gets the entry to add.
|
Dn |
getEntryDn()
Gets the distinguished name of the entry to add.
|
int |
getEntryLength() |
List<Integer> |
getValuesLength() |
AddRequest |
removeControl(Control control)
Deletes a control removing it from this Message.
|
void |
setAddRequestLength(int addRequestLength)
Stores the encoded length for the AddRequest
|
void |
setAttributesLength(List<Integer> attributesLength)
Stores the encoded length for the attributes
|
AddRequest |
setEntry(Entry entry)
Sets the Entry to add.
|
AddRequest |
setEntryDn(Dn entry)
Sets the distinguished name of the entry to add.
|
void |
setEntryLength(int entryLength)
Stores the encoded length for the Entry
|
AddRequest |
setMessageId(int messageId)
Sets the Message ID for this request
|
void |
setValuesLength(List<Integer> valuesLength)
Stores the encoded length for the values
|
abandon, addAbandonListener, getResponseType, isAbandoned
getResultResponse, hasResponse
get, getCodecService, getControl, getControls, getControlsLength, getCurrentControl, getDecorated, getDecorator, getMessageId, getMessageLength, getType, hasControl, put, setControlsLength, setMessageLength, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getResponseType
getResultResponse
hasResponse
get, getControl, getControls, getMessageId, getType, hasControl, put
abandon, addAbandonListener, isAbandoned
public AddRequestDecorator(LdapApiService codec, AddRequest decoratedMessage)
decoratedMessage
- the decorated AddRequestpublic void setAddRequestLength(int addRequestLength)
addRequestLength
- The encoded lengthpublic int getAddRequestLength()
public void setEntryLength(int entryLength)
entryLength
- The encoded lengthpublic int getEntryLength()
public void setAttributesLength(List<Integer> attributesLength)
attributesLength
- The encoded lengthpublic List<Integer> getAttributesLength()
public void setValuesLength(List<Integer> valuesLength)
valuesLength
- The encoded lengthpublic List<Integer> getValuesLength()
public AddRequest setMessageId(int messageId)
setMessageId
in interface AddRequest
setMessageId
in interface Message
setMessageId
in class MessageDecorator<AddRequest>
messageId
- The message Idpublic AddRequest addControl(Control control)
addControl
in interface AddRequest
addControl
in interface Message
addControl
in class MessageDecorator<AddRequest>
control
- the control to add.public AddRequest addAllControls(Control[] controls)
addAllControls
in interface AddRequest
addAllControls
in interface Message
addAllControls
in class MessageDecorator<AddRequest>
controls
- the controls to add.public AddRequest removeControl(Control control)
removeControl
in interface AddRequest
removeControl
in interface Message
removeControl
in class MessageDecorator<AddRequest>
control
- the control to remove.public Dn getEntryDn()
getEntryDn
in interface AddRequest
public AddRequest setEntryDn(Dn entry)
setEntryDn
in interface AddRequest
entry
- the Dn of the added entry.public Entry getEntry()
getEntry
in interface AddRequest
public AddRequest setEntry(Entry entry)
setEntry
in interface AddRequest
entry
- the added Entrypublic void addAttributeType(String type) throws LdapException
type
- The attribute's name (called 'type' in the grammar)LdapException
public String getCurrentAttributeType()
public void addAttributeValue(String value) throws LdapException
value
- The value to addLdapException
public void addAttributeValue(Value<?> value) throws LdapException
value
- The value to addLdapException
public void addAttributeValue(byte[] value) throws LdapException
value
- The value to addLdapException
public int computeLength()
computeLength
in interface Asn1Object
computeLength
in interface Decorator<AddRequest>
public ByteBuffer encode(ByteBuffer buffer) throws EncoderException
encode
in interface Asn1Object
encode
in interface Decorator<AddRequest>
buffer
- The buffer where to put the PDUEncoderException
- if the buffer can't be encodedCopyright © 2003–2014 The Apache Software Foundation. All rights reserved.