public class SearchResultReferenceDecorator extends MessageDecorator<SearchResultReference> implements SearchResultReference
Constructor and Description |
---|
SearchResultReferenceDecorator(LdapApiService codec,
SearchResultReference decoratedMessage)
Makes a SearchResultReference encodable.
|
Modifier and Type | Method and Description |
---|---|
int |
computeLength()
Compute the SearchResultReference length
SearchResultReference : |
ByteBuffer |
encode(ByteBuffer buffer)
Encode the SearchResultReference message to a PDU.
|
Referral |
getReferral()
Gets the sequence of LdapUrls as a Referral instance.
|
void |
setReferral(Referral referral)
Sets the sequence of LdapUrls as a Referral instance.
|
addAllControls, addControl, get, getCodecService, getControl, getControls, getControlsLength, getCurrentControl, getDecorated, getDecorator, getMessageId, getMessageLength, getType, hasControl, put, removeControl, setControlsLength, setMessageId, setMessageLength, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
addAllControls, addControl, get, getControl, getControls, getMessageId, getType, hasControl, put, removeControl, setMessageId
public SearchResultReferenceDecorator(LdapApiService codec, SearchResultReference decoratedMessage)
codec
- The LDAP service instancedecoratedMessage
- the decorated SearchResultReferencepublic Referral getReferral()
getReferral
in interface SearchResultReference
public void setReferral(Referral referral)
setReferral
in interface SearchResultReference
referral
- the sequence of LdapUrlspublic int computeLength()
0x73 L1 | +--> 0x04 L2 reference +--> 0x04 L3 reference +--> ... +--> 0x04 Li reference +--> ... +--> 0x04 Ln reference L1 = n*Length(0x04) + sum(Length(Li)) + sum(Length(reference[i])) Length(SearchResultReference) = Length(0x73 + Length(L1) + L1
computeLength
in interface Asn1Object
computeLength
in interface Decorator<SearchResultReference>
public ByteBuffer encode(ByteBuffer buffer) throws EncoderException
0x73 LL 0x04 LL reference [0x04 LL reference]*
encode
in interface Asn1Object
encode
in interface Decorator<SearchResultReference>
buffer
- The buffer where to put the PDUEncoderException
- if the buffer can't be encodedCopyright © 2003–2018 The Apache Software Foundation. All rights reserved.