public class PersistentSearchDecorator extends ControlDecorator<PersistentSearch> implements PersistentSearch
| Modifier and Type | Field and Description |
|---|---|
private static Asn1Decoder |
DECODER
An instance of this decoder
|
private int |
psearchSeqLength
A temporary storage for a psearch length
|
value, valueLengthCHANGE_TYPES_MAX, CHANGE_TYPES_MIN, OID| Constructor and Description |
|---|
PersistentSearchDecorator(LdapApiService codec)
Default constructor creates a PersistentSearch Control automatically
wrapped in a decorator object inside this container.
|
PersistentSearchDecorator(LdapApiService codec,
PersistentSearch control)
Creates a PersistentSearch Control wrapping a supplied PersistentSearch
Control.
|
| Modifier and Type | Method and Description |
|---|---|
int |
computeLength()
Compute the PagedSearchControl length, which is the sum
of the control length and the value length.
|
Asn1Object |
decode(byte[] controlBytes)
Decodes raw ASN.1 encoded bytes into an Asn1Object for the control.
|
void |
enableNotification(ChangeType changeType) |
java.nio.ByteBuffer |
encode(java.nio.ByteBuffer buffer)
Encodes the persistent search control.
|
int |
getChangeTypes() |
private PersistentSearch |
getPersistentSearch() |
byte[] |
getValue()
Get the control value
|
boolean |
isChangesOnly() |
boolean |
isNotificationEnabled(ChangeType changeType) |
boolean |
isReturnECs() |
void |
setChangesOnly(boolean changesOnly) |
void |
setChangeTypes(int changeTypes) |
void |
setReturnECs(boolean returnECs) |
equals, getCodecService, getDecorated, getOid, hashCode, hasValue, isCritical, setCritical, setDecorated, setValue, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetOid, isCritical, setCriticalprivate int psearchSeqLength
private static final Asn1Decoder DECODER
public PersistentSearchDecorator(LdapApiService codec)
public PersistentSearchDecorator(LdapApiService codec, PersistentSearch control)
control - The PersistentSearch Control to wrap.public int computeLength()
PersistentSearchDecorator value length : 0x30 L1 | +--> 0x02 0x0(1-4) [0..2^31-1] (changeTypes) +--> 0x01 0x01 [0x00 | 0xFF] (changeOnly) +--> 0x01 0x01 [0x00 | 0xFF] (returnRCs)
computeLength in interface Asn1ObjectcomputeLength in interface Decorator<PersistentSearch>computeLength in class ControlDecorator<PersistentSearch>public java.nio.ByteBuffer encode(java.nio.ByteBuffer buffer)
throws EncoderException
encode in interface Asn1Objectencode in interface Decorator<PersistentSearch>buffer - The encoded sinkEncoderException - If anything goes wrong.public byte[] getValue()
getValue in interface CodecControl<PersistentSearch>getValue in class ControlDecorator<PersistentSearch>private PersistentSearch getPersistentSearch()
public void setChangesOnly(boolean changesOnly)
setChangesOnly in interface PersistentSearchpublic boolean isChangesOnly()
isChangesOnly in interface PersistentSearchpublic void setReturnECs(boolean returnECs)
setReturnECs in interface PersistentSearchpublic boolean isReturnECs()
isReturnECs in interface PersistentSearchpublic void setChangeTypes(int changeTypes)
setChangeTypes in interface PersistentSearchpublic int getChangeTypes()
getChangeTypes in interface PersistentSearchpublic boolean isNotificationEnabled(ChangeType changeType)
isNotificationEnabled in interface PersistentSearchpublic void enableNotification(ChangeType changeType)
enableNotification in interface PersistentSearchpublic Asn1Object decode(byte[] controlBytes) throws DecoderException
decode in interface CodecControl<PersistentSearch>controlBytes - the encoded control bytesDecoderException - if anything goes wrong