org.apache.directory.shared.ldap.codec.controls.replication.syncDoneValue
Class SyncDoneValueControl

java.lang.Object
  extended by org.apache.directory.shared.asn1.AbstractAsn1Object
      extended by org.apache.directory.shared.ldap.codec.controls.AbstractControl
          extended by org.apache.directory.shared.ldap.codec.controls.replication.syncDoneValue.SyncDoneValueControl
All Implemented Interfaces:
Asn1Object, CodecControl, Control

public class SyncDoneValueControl
extends AbstractControl

A syncDoneValue object as described in rfc4533.

Version:
$Rev$, $Date$
Author:
Apache Directory Project

Field Summary
static java.lang.String CONTROL_OID
          This control OID
 
Fields inherited from class org.apache.directory.shared.ldap.codec.controls.AbstractControl
decoder, value, valueLength
 
Fields inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object
parent
 
Constructor Summary
SyncDoneValueControl()
          Creates a new instance of SyncDoneValueControlCodec.
 
Method Summary
 int computeLength()
          Compute the syncDoneValue length.
 java.nio.ByteBuffer encode(java.nio.ByteBuffer buffer)
          Encode the SyncDoneValue control
 byte[] getCookie()
           
 byte[] getValue()
          Get the control value
 boolean isRefreshDeletes()
           
 void setCookie(byte[] cookie)
           
 void setRefreshDeletes(boolean refreshDeletes)
           
 java.lang.String toString()
          Return a String representing a Control
 
Methods inherited from class org.apache.directory.shared.ldap.codec.controls.AbstractControl
computeLength, getDecoder, getOid, hasValue, isCritical, setCritical, setValue
 
Methods inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object
addLength, getCurrentLength, getExpectedLength, getParent, getTlvId, setCurrentLength, setExpectedLength, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CONTROL_OID

public static final java.lang.String CONTROL_OID
This control OID

See Also:
Constant Field Values
Constructor Detail

SyncDoneValueControl

public SyncDoneValueControl()
Creates a new instance of SyncDoneValueControlCodec.

Method Detail

computeLength

public int computeLength()
Compute the syncDoneValue length. 0x30 L1 | +--> 0x04 L2 xkcd!!!... (cookie) +--> 0x01 0x01 [0x00|0xFF] (refreshDeletes)

Specified by:
computeLength in interface Asn1Object
Specified by:
computeLength in interface CodecControl
Overrides:
computeLength in class AbstractControl
Returns:
The object's computed length

encode

public java.nio.ByteBuffer encode(java.nio.ByteBuffer buffer)
                           throws EncoderException
Encode the SyncDoneValue control

Specified by:
encode in interface Asn1Object
Specified by:
encode in interface CodecControl
Overrides:
encode in class AbstractControl
Parameters:
buffer - The encoded sink
Returns:
A ByteBuffer that contains the encoded PDU
Throws:
EncoderException - If anything goes wrong while encoding.

getValue

public byte[] getValue()
Get the control value

Specified by:
getValue in interface Control
Overrides:
getValue in class AbstractControl
Returns:
The control value

getCookie

public byte[] getCookie()
Returns:
the cookie

setCookie

public void setCookie(byte[] cookie)
Parameters:
cookie - cookie to be set

isRefreshDeletes

public boolean isRefreshDeletes()
Returns:
true, if refreshDeletes flag is set, false otherwise

setRefreshDeletes

public void setRefreshDeletes(boolean refreshDeletes)
Parameters:
refreshDeletes - set the refreshDeletes flag

toString

public java.lang.String toString()
Description copied from class: AbstractControl
Return a String representing a Control

Overrides:
toString in class AbstractControl
See Also:
Object.toString()


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.