public class SyncInfoValueDecorator
extends org.apache.directory.api.ldap.codec.decorators.IntermediateResponseDecorator<org.apache.directory.api.ldap.extras.intermediate.syncrepl.SyncInfoValue>
implements org.apache.directory.api.ldap.extras.intermediate.syncrepl.SyncInfoValue
| Modifier and Type | Field and Description |
|---|---|
private static org.apache.directory.api.asn1.ber.Asn1Decoder |
DECODER
An instance of this decoder
|
private int |
syncInfoValueLength
The global length for this response
|
private int |
syncUUIDsLength
The syncUUIDs cumulative length
|
protected byte[] |
value
The encoded value.
|
protected int |
valueLength
The encoded value length
|
| Constructor and Description |
|---|
SyncInfoValueDecorator(org.apache.directory.api.ldap.codec.api.LdapApiService codec)
The constructor for this codec.
|
SyncInfoValueDecorator(org.apache.directory.api.ldap.codec.api.LdapApiService codec,
org.apache.directory.api.ldap.extras.intermediate.syncrepl.SynchronizationInfoEnum type)
The constructor for this codec.
|
SyncInfoValueDecorator(org.apache.directory.api.ldap.codec.api.LdapApiService codec,
org.apache.directory.api.ldap.extras.intermediate.syncrepl.SyncInfoValue syncInfoValue)
The constructor for this codec.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSyncUUID(byte[] syncUUID) |
int |
computeLength()
Compute the SyncInfoValue length.
|
org.apache.directory.api.asn1.Asn1Object |
decode(byte[] responseBytes) |
ByteBuffer |
encode(ByteBuffer buffer)
Encode the SyncInfoValue response
|
byte[] |
getCookie() |
org.apache.directory.api.ldap.extras.intermediate.syncrepl.SynchronizationInfoEnum |
getSyncInfoValueType() |
List<byte[]> |
getSyncUUIDs() |
byte[] |
getValue() |
boolean |
isRefreshDeletes() |
boolean |
isRefreshDone() |
void |
setCookie(byte[] cookie) |
void |
setRefreshDeletes(boolean refreshDeletes) |
void |
setRefreshDone(boolean refreshDone) |
void |
setSyncInfoValueType(org.apache.directory.api.ldap.extras.intermediate.syncrepl.SynchronizationInfoEnum syncInfoValueType) |
void |
setSyncUUIDs(List<byte[]> syncUUIDs) |
String |
toString() |
getResponseName, getResponseValue, setResponseName, setResponseValuegetLdapResult, setLdapResultaddAllControls, addControl, get, getCodecService, getControl, getControls, getControlsLength, getCurrentControl, getDecorated, getDecorator, getMessageId, getMessageLength, getType, hasControl, put, removeControl, setControlsLength, setMessageId, setMessageLengthclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetResponseName, getResponseValue, setResponseName, setResponseValueprivate int syncUUIDsLength
private static final org.apache.directory.api.asn1.ber.Asn1Decoder DECODER
private int syncInfoValueLength
protected int valueLength
protected byte[] value
public SyncInfoValueDecorator(org.apache.directory.api.ldap.codec.api.LdapApiService codec)
codec - The LDAP Service to usepublic SyncInfoValueDecorator(org.apache.directory.api.ldap.codec.api.LdapApiService codec,
org.apache.directory.api.ldap.extras.intermediate.syncrepl.SyncInfoValue syncInfoValue)
codec - The LDAP Service to usesyncInfoValue - The SyncInfoValue to decoratepublic SyncInfoValueDecorator(org.apache.directory.api.ldap.codec.api.LdapApiService codec,
org.apache.directory.api.ldap.extras.intermediate.syncrepl.SynchronizationInfoEnum type)
codec - The LDAP Service to usetype - The kind of syncInfo we will store. Can be newCookie,
refreshPresent, refreshDelete or syncIdSetpublic org.apache.directory.api.ldap.extras.intermediate.syncrepl.SynchronizationInfoEnum getSyncInfoValueType()
getSyncInfoValueType in interface org.apache.directory.api.ldap.extras.intermediate.syncrepl.SyncInfoValuepublic void setSyncInfoValueType(org.apache.directory.api.ldap.extras.intermediate.syncrepl.SynchronizationInfoEnum syncInfoValueType)
setSyncInfoValueType in interface org.apache.directory.api.ldap.extras.intermediate.syncrepl.SyncInfoValuepublic byte[] getCookie()
getCookie in interface org.apache.directory.api.ldap.extras.intermediate.syncrepl.SyncInfoValuepublic void setCookie(byte[] cookie)
setCookie in interface org.apache.directory.api.ldap.extras.intermediate.syncrepl.SyncInfoValuepublic boolean isRefreshDone()
isRefreshDone in interface org.apache.directory.api.ldap.extras.intermediate.syncrepl.SyncInfoValuepublic void setRefreshDone(boolean refreshDone)
setRefreshDone in interface org.apache.directory.api.ldap.extras.intermediate.syncrepl.SyncInfoValuepublic boolean isRefreshDeletes()
isRefreshDeletes in interface org.apache.directory.api.ldap.extras.intermediate.syncrepl.SyncInfoValuepublic void setRefreshDeletes(boolean refreshDeletes)
setRefreshDeletes in interface org.apache.directory.api.ldap.extras.intermediate.syncrepl.SyncInfoValuepublic List<byte[]> getSyncUUIDs()
getSyncUUIDs in interface org.apache.directory.api.ldap.extras.intermediate.syncrepl.SyncInfoValuepublic void setSyncUUIDs(List<byte[]> syncUUIDs)
setSyncUUIDs in interface org.apache.directory.api.ldap.extras.intermediate.syncrepl.SyncInfoValuepublic void addSyncUUID(byte[] syncUUID)
addSyncUUID in interface org.apache.directory.api.ldap.extras.intermediate.syncrepl.SyncInfoValuepublic int computeLength()
0xA0 L1 abcd // newCookie
0xA1 L2 // refreshDelete
|
[+--> 0x04 L3 abcd] // cookie
[+--> 0x01 0x01 (0x00|0xFF) // refreshDone
0xA2 L4 // refreshPresent
|
[+--> 0x04 L5 abcd] // cookie
[+--> 0x01 0x01 (0x00|0xFF) // refreshDone
0xA3 L6 // syncIdSet
|
[+--> 0x04 L7 abcd] // cookie
[+--> 0x01 0x01 (0x00|0xFF) // refreshDeletes
+--> 0x31 L8 // SET OF syncUUIDs
|
[+--> 0x04 L9 abcd] // syncUUID
computeLength in interface org.apache.directory.api.asn1.Asn1ObjectcomputeLength in class org.apache.directory.api.ldap.codec.decorators.IntermediateResponseDecorator<org.apache.directory.api.ldap.extras.intermediate.syncrepl.SyncInfoValue>public ByteBuffer encode(ByteBuffer buffer) throws org.apache.directory.api.asn1.EncoderException
encode in interface org.apache.directory.api.asn1.Asn1Objectencode in class org.apache.directory.api.ldap.codec.decorators.IntermediateResponseDecorator<org.apache.directory.api.ldap.extras.intermediate.syncrepl.SyncInfoValue>buffer - The encoded sinkorg.apache.directory.api.asn1.EncoderException - If anything goes wrong.public byte[] getValue()
public org.apache.directory.api.asn1.Asn1Object decode(byte[] responseBytes)
throws org.apache.directory.api.asn1.DecoderException
org.apache.directory.api.asn1.DecoderExceptionpublic String toString()
toString in class org.apache.directory.api.ldap.codec.api.MessageDecorator<org.apache.directory.api.ldap.extras.intermediate.syncrepl.SyncInfoValue>Object.toString()Copyright © 2003–2018 The Apache Software Foundation. All rights reserved.