org.apache.directory.shared.ldap.codec.controls.replication.syncInfoValue
Class SyncInfoValueControlCodec
java.lang.Object
org.apache.directory.shared.asn1.AbstractAsn1Object
org.apache.directory.shared.ldap.codec.controls.replication.syncInfoValue.SyncInfoValueControlCodec
- All Implemented Interfaces:
- Asn1Object
public class SyncInfoValueControlCodec
- extends AbstractAsn1Object
A syncInfoValue object, as defined in RFC 4533
- Version:
- $Rev:$, $Date:
- Author:
- Apache Directory Project
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SyncInfoValueControlCodec
public SyncInfoValueControlCodec(SynchronizationInfoEnum type)
- The constructor for this codec.
- Parameters:
type - The kind of syncInfo we will store. Can be newCookie,
refreshPresent, refreshDelete or syncIdSet
getType
public SynchronizationInfoEnum getType()
- Get the control type.
- Returns:
- the type : one of newCookie, refreshDelete, refreshPresent or syncIdSet
setType
public void setType(SynchronizationInfoEnum type)
- Parameters:
syncMode - the syncMode to set
getCookie
public byte[] getCookie()
- Returns:
- the cookie
setCookie
public void setCookie(byte[] cookie)
- Parameters:
cookie - the cookie to set
isRefreshDone
public boolean isRefreshDone()
- Returns:
- the refreshDone
setRefreshDone
public void setRefreshDone(boolean refreshDone)
- Parameters:
refreshDone - the refreshDone to set
isRefreshDeletes
public boolean isRefreshDeletes()
- Returns:
- the refreshDeletes
setRefreshDeletes
public void setRefreshDeletes(boolean refreshDeletes)
- Parameters:
refreshDeletes - the refreshDeletes to set
getSyncUUIDs
public java.util.List<byte[]> getSyncUUIDs()
- Returns:
- the syncUUIDs
setSyncUUIDs
public void setSyncUUIDs(java.util.List<byte[]> syncUUIDs)
- Parameters:
syncUUIDs - the syncUUIDs to set
computeLength
public int computeLength()
- Compute the SyncInfoValue length.
SyncInfoValue :
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 public static final int AND_FILTER_TAG = 0xA0;
public static final int OR_FILTER_TAG = 0xA1;
public static final int NOT_FILTER_TAG = 0xA2;
public static final int BIND_REQUEST_SASL_TAG = 0xA3;
- Specified by:
computeLength in interface Asn1Object- Specified by:
computeLength in class AbstractAsn1Object
encode
public java.nio.ByteBuffer encode(java.nio.ByteBuffer bb)
throws EncoderException
- Encode the SyncInfoValue control
- Specified by:
encode in interface Asn1Object- Overrides:
encode in class AbstractAsn1Object
- Parameters:
buffer - The encoded sink
- Returns:
- A ByteBuffer that contains the encoded PDU
- Throws:
EncoderException - If anything goes wrong.
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
- See Also:
Object.toString()
Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.