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.
|
String |
getCurrentAttributeType() |
Entry |
getEntry()
Gets the entry to add.
|
Dn |
getEntryDn()
Gets the distinguished name of the entry to add.
|
AddRequest |
removeControl(Control control)
Deletes a control removing it from this Message.
|
AddRequest |
setEntry(Entry entry)
Sets the Entry to add.
|
AddRequest |
setEntryDn(Dn entry)
Sets the distinguished name of the entry to add.
|
AddRequest |
setMessageId(int messageId)
Sets the Message ID for this request
|
abandon, addAbandonListener, getResponseType, isAbandonedgetResultResponse, hasResponseget, getCodecService, getControl, getControls, getControlsLength, getCurrentControl, getDecorated, getDecorator, getMessageId, getMessageLength, getType, hasControl, put, setControlsLength, setMessageLength, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetResponseTypegetResultResponsehasResponseget, getControl, getControls, getMessageId, getType, hasControl, putabandon, addAbandonListener, isAbandonedpublic AddRequestDecorator(LdapApiService codec, AddRequest decoratedMessage)
decoratedMessage - the decorated AddRequestpublic AddRequest setMessageId(int messageId)
setMessageId in interface AddRequestsetMessageId in interface MessagesetMessageId in class MessageDecorator<AddRequest>messageId - The message Idpublic AddRequest addControl(Control control)
addControl in interface AddRequestaddControl in interface MessageaddControl in class MessageDecorator<AddRequest>control - the control to add.public AddRequest addAllControls(Control[] controls)
addAllControls in interface AddRequestaddAllControls in interface MessageaddAllControls in class MessageDecorator<AddRequest>controls - the controls to add.public AddRequest removeControl(Control control)
removeControl in interface AddRequestremoveControl in interface MessageremoveControl in class MessageDecorator<AddRequest>control - the control to remove.public Dn getEntryDn()
getEntryDn in interface AddRequestpublic AddRequest setEntryDn(Dn entry)
setEntryDn in interface AddRequestentry - the Dn of the added entry.public Entry getEntry()
getEntry in interface AddRequestpublic AddRequest setEntry(Entry entry)
setEntry in interface AddRequestentry - the added Entrypublic void addAttributeType(String type) throws LdapException
type - The attribute's name (called 'type' in the grammar)LdapExceptionpublic String getCurrentAttributeType()
public void addAttributeValue(String value) throws LdapException
value - The value to addLdapExceptionpublic void addAttributeValue(Value<?> value) throws LdapException
value - The value to addLdapExceptionpublic void addAttributeValue(byte[] value)
throws LdapException
value - The value to addLdapExceptionpublic int computeLength()
computeLength in interface Asn1ObjectcomputeLength in interface Decorator<AddRequest>public ByteBuffer encode(ByteBuffer buffer) throws EncoderException
encode in interface Asn1Objectencode in interface Decorator<AddRequest>buffer - The buffer where to put the PDUEncoderException - if the buffer can't be encodedCopyright © 2021. All rights reserved.