public class AddRequestCodec extends LdapMessageCodec
ldapMessageLengthparent| Constructor and Description |
|---|
AddRequestCodec()
Creates a new AddRequest object.
|
| Modifier and Type | Method and Description |
|---|---|
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
|
protected int |
computeLengthProtocolOp()
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
| +--> ...
|
protected void |
encodeProtocolOp(ByteBuffer buffer)
Encode the AddRequest message to a PDU.
|
String |
getCurrentAttributeType() |
Entry |
getEntry()
Get the entry to be added
|
DN |
getEntryDn()
Get the added DN
|
MessageTypeEnum |
getMessageType()
Get the message type
|
String |
getMessageTypeName()
Get the message type Name
|
void |
initEntry()
Initialize the Entry.
|
void |
setEntry(Entry entry)
Sets the entry.
|
void |
setEntryDn(DN entryDn)
Set the added DN.
|
String |
toString()
Return a String representing an AddRequest
|
addControl, addControls, computeLength, encode, getCodecControl, getControls, getControls, getCurrentControl, getMessageId, initControls, setMessageId, toStringaddLength, encode, getCurrentLength, getExpectedLength, getParent, getTlvId, setCurrentLength, setExpectedLength, setParentpublic MessageTypeEnum getMessageType()
getMessageType in class LdapMessageCodecpublic String getMessageTypeName()
getMessageTypeName in class LdapMessageCodecpublic void initEntry()
public Entry getEntry()
public void setEntry(Entry entry)
entry - the entrypublic void addAttributeType(String type) throws LdapException
type - The attribute's name (called 'type' in the grammar)LdapExceptionpublic void addAttributeValue(String value)
value - The value to addpublic void addAttributeValue(Value<?> value)
value - The value to addpublic void addAttributeValue(byte[] value)
value - The value to addpublic DN getEntryDn()
public void setEntryDn(DN entryDn)
entry - The DN to set.protected int computeLengthProtocolOp()
computeLengthProtocolOp in class LdapMessageCodecprotected void encodeProtocolOp(ByteBuffer buffer) throws EncoderException
encodeProtocolOp in class LdapMessageCodecbuffer - The buffer where to put the PDUEncoderExceptionpublic String getCurrentAttributeType()
Copyright © 2003–2016 The Apache Software Foundation. All rights reserved.