Class DirSyncControl

java.lang.Object
org.ldaptive.control.AbstractControl
org.ldaptive.ad.control.DirSyncControl
All Implemented Interfaces:
Control, RequestControl, ResponseControl

public class DirSyncControl extends AbstractControl implements RequestControl, ResponseControl
Request/response control for active directory synchronization. Control is defined as:
    dirSyncValue ::= SEQUENCE {
        flags              INTEGER,
        maxAttributeCount  INTEGER,
        cookie             OCTET STRING
    }
 

See http://msdn.microsoft.com/en-us/library/cc223347.aspx

  • Field Details

    • OID

      public static final String OID
      OID of this control.
      See Also:
    • HASH_CODE_SEED

      private static final int HASH_CODE_SEED
      hash value seed.
      See Also:
    • flags

      private long flags
      flags.
    • maxAttributeCount

      private int maxAttributeCount
      maximum attribute count.
  • Constructor Details

    • DirSyncControl

      public DirSyncControl()
      Default constructor.
    • DirSyncControl

      public DirSyncControl(boolean critical)
      Creates a new dir sync control.
      Parameters:
      critical - whether this control is critical
    • DirSyncControl

      public DirSyncControl(DirSyncControl.Flag[] f)
      Creates a new dir sync control.
      Parameters:
      f - request flags
    • DirSyncControl

      public DirSyncControl(DirSyncControl.Flag[] f, boolean critical)
      Creates a new dir sync control.
      Parameters:
      f - request flags
      critical - whether this control is critical
    • DirSyncControl

      public DirSyncControl(DirSyncControl.Flag[] f, int count)
      Creates a new dir sync control.
      Parameters:
      f - request flags
      count - maximum attribute count
    • DirSyncControl

      public DirSyncControl(DirSyncControl.Flag[] f, int count, boolean critical)
      Creates a new dir sync control.
      Parameters:
      f - request flags
      count - maximum attribute count
      critical - whether this control is critical
    • DirSyncControl

      public DirSyncControl(DirSyncControl.Flag[] f, byte[] value, boolean critical)
      Creates a new dir sync control.
      Parameters:
      f - request flags
      value - dir sync cookie
      critical - whether this control is critical
    • DirSyncControl

      public DirSyncControl(DirSyncControl.Flag[] f, byte[] value, int count, boolean critical)
      Creates a new dir sync control.
      Parameters:
      f - request flags
      value - dir sync cookie
      count - maximum attribute count
      critical - whether this control is critical
  • Method Details

    • hasValue

      public boolean hasValue()
      Description copied from interface: RequestControl
      Returns whether the control has a value associated with it.
      Specified by:
      hasValue in interface RequestControl
      Returns:
      whether the control has a value
    • getFlags

      public long getFlags()
      Returns the flags value.
      Returns:
      flags value
    • setFlags

      public void setFlags(long l)
      Sets the flags.
      Parameters:
      l - flags value
    • getMaxAttributeCount

      public int getMaxAttributeCount()
      Returns the maximum attribute count.
      Returns:
      maximum attribute count
    • setMaxAttributeCount

      public void setMaxAttributeCount(int count)
      Sets the maximum attribute count.
      Parameters:
      count - maximum attribute count
    • getCookie

      public byte[] getCookie()
      Returns the sync request cookie.
      Returns:
      sync request cookie
    • setCookie

      public void setCookie(byte[] value)
      Sets the sync request cookie.
      Parameters:
      value - sync request cookie
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class AbstractControl
    • hashCode

      public int hashCode()
      Description copied from class: AbstractControl
      Returns the hash code for this object.
      Specified by:
      hashCode in class AbstractControl
      Returns:
      hash code
    • toString

      public String toString()
      Overrides:
      toString in class AbstractControl
    • encode

      public byte[] encode()
      Description copied from interface: RequestControl
      Provides the BER encoding of this control.
      Specified by:
      encode in interface RequestControl
      Returns:
      BER encoded request control
    • decode

      public void decode(DERBuffer encoded)
      Description copied from interface: ResponseControl
      Initializes this response control with the supplied BER encoded data.
      Specified by:
      decode in interface ResponseControl
      Parameters:
      encoded - BER encoded response control