org.apache.directory.shared.ldap.codec.controls.replication.syncStateValue
Class SyncStateValueControlCodec

java.lang.Object
  extended by org.apache.directory.shared.asn1.AbstractAsn1Object
      extended by org.apache.directory.shared.ldap.codec.controls.replication.syncStateValue.SyncStateValueControlCodec
All Implemented Interfaces:
Asn1Object

public class SyncStateValueControlCodec
extends AbstractAsn1Object

A syncStateValue object, as defined in RFC 4533

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

Field Summary
 
Fields inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object
parent
 
Constructor Summary
SyncStateValueControlCodec()
           
 
Method Summary
 int computeLength()
          Compute the SyncStateValue length.
 java.nio.ByteBuffer encode(java.nio.ByteBuffer buffer)
          Encode the SyncStateValue control
 byte[] getCookie()
           
 byte[] getEntryUUID()
           
 SyncStateTypeEnum getSyncStateType()
           
 void setCookie(byte[] cookie)
           
 void setEntryUUID(byte[] entryUUID)
          set the entryUUID
 void setSyncStateType(SyncStateTypeEnum syncStateType)
          set the syncState's type
 java.lang.String toString()
           
 
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
 

Constructor Detail

SyncStateValueControlCodec

public SyncStateValueControlCodec()
Method Detail

getCookie

public byte[] getCookie()
Returns:
the cookie

setCookie

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

getSyncStateType

public SyncStateTypeEnum getSyncStateType()
Returns:
the syncState's type

setSyncStateType

public void setSyncStateType(SyncStateTypeEnum syncStateType)
set the syncState's type

Parameters:
syncStateType - the syncState's type

getEntryUUID

public byte[] getEntryUUID()
Returns:
the entryUUID

setEntryUUID

public void setEntryUUID(byte[] entryUUID)
set the entryUUID

Parameters:
entryUUID - the entryUUID

computeLength

public int computeLength()
Compute the SyncStateValue length. SyncStateValue : 0x30 L1 | +--> 0x0A 0x01 [0x00|0x01|0x02|0x03] (type) [+--> 0x04 L2 abcd... (entryUUID) [+--> 0x04 L3 abcd... (cookie)

Specified by:
computeLength in interface Asn1Object
Specified by:
computeLength in class AbstractAsn1Object

encode

public java.nio.ByteBuffer encode(java.nio.ByteBuffer buffer)
                           throws EncoderException
Encode the SyncStateValue 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.