public class SearchResultEntryDecorator extends MessageDecorator<SearchResultEntry> implements SearchResultEntry
messageLength| Constructor and Description |
|---|
SearchResultEntryDecorator(LdapApiService codec,
SearchResultEntry decoratedMessage)
Makes a SearchResultEntry encodable.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(byte[] type)
Create a new attribute
|
void |
addAttribute(String type)
Create a new attribute
|
void |
addAttributeValue(Object value)
Add a new value to the current attribute
|
int |
computeLength()
Compute the SearchResultEntry length
SearchResultEntry :
|
ByteBuffer |
encode(ByteBuffer buffer)
Encode the SearchResultEntry message to a PDU.
|
Attribute |
getCurrentAttribute() |
Entry |
getEntry()
Gets the entry.
|
Dn |
getObjectName()
Gets the distinguished name of the entry object returned.
|
void |
setEntry(Entry entry)
Sets an entry
|
void |
setObjectName(Dn objectName)
Sets the distinguished name of the entry object returned.
|
addAllControls, addControl, get, getCodecService, getControl, getControls, getControlsLength, getCurrentControl, getDecorated, getDecorator, getMessageId, getMessageLength, getType, hasControl, put, removeControl, setControlsLength, setMessageId, setMessageLength, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddAllControls, addControl, get, getControl, getControls, getMessageId, getType, hasControl, put, removeControl, setMessageIdpublic SearchResultEntryDecorator(LdapApiService codec, SearchResultEntry decoratedMessage)
decoratedMessage - the decorated SearchResultEntrypublic Attribute getCurrentAttribute()
public void addAttribute(String type) throws LdapException
type - The attribute's typeLdapExceptionpublic void addAttribute(byte[] type)
throws LdapException
type - The attribute's typeLdapExceptionpublic void addAttributeValue(Object value) throws LdapException
value - The added valueLdapExceptionpublic Dn getObjectName()
getObjectName in interface SearchResultEntrypublic void setObjectName(Dn objectName)
setObjectName in interface SearchResultEntryobjectName - the Dn of the entry returned.public Entry getEntry()
getEntry in interface SearchResultEntrypublic void setEntry(Entry entry)
setEntry in interface SearchResultEntryentry - the entrypublic int computeLength()
0x64 L1
|
+--> 0x04 L2 objectName
+--> 0x30 L3 (attributes)
|
+--> 0x30 L4-1 (partial attributes list)
| |
| +--> 0x04 L5-1 type
| +--> 0x31 L6-1 (values)
| |
| +--> 0x04 L7-1-1 value
| +--> ...
| +--> 0x04 L7-1-n value
|
+--> 0x30 L4-2 (partial attributes list)
| |
| +--> 0x04 L5-2 type
| +--> 0x31 L6-2 (values)
| |
| +--> 0x04 L7-2-1 value
| +--> ...
| +--> 0x04 L7-2-n value
|
+--> ...
|
+--> 0x30 L4-m (partial attributes list)
|
+--> 0x04 L5-m type
+--> 0x31 L6-m (values)
|
+--> 0x04 L7-m-1 value
+--> ...
+--> 0x04 L7-m-n value
computeLength in interface Asn1ObjectcomputeLength in interface Decorator<SearchResultEntry>public ByteBuffer encode(ByteBuffer buffer) throws EncoderException
0x64 LL
0x04 LL objectName
0x30 LL attributes
0x30 LL partialAttributeList
0x04 LL type
0x31 LL vals
0x04 LL attributeValue
...
0x04 LL attributeValue
...
0x30 LL partialAttributeList
0x04 LL type
0x31 LL vals
0x04 LL attributeValue
...
0x04 LL attributeValue
encode in interface Asn1Objectencode in interface Decorator<SearchResultEntry>buffer - The buffer where to put the PDUsearchResultEntryDecorator - the SearchResultEntry decoratorEncoderException - if the buffer can't be encodedCopyright © 2021. All rights reserved.