Package org.ldaptive.ad.control
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
- Author:
- Middleware Services
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DirSyncControl.Flag
Types of flags.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
OID
OID of this control.-
Fields inherited from class org.ldaptive.control.AbstractControl
logger
-
-
Constructor Summary
Constructors Constructor Description DirSyncControl()
Default constructor.DirSyncControl(boolean critical)
Creates a new dir sync control.DirSyncControl(DirSyncControl.Flag[] f)
Creates a new dir sync control.DirSyncControl(DirSyncControl.Flag[] f, boolean critical)
Creates a new dir sync control.DirSyncControl(DirSyncControl.Flag[] f, byte[] value, boolean critical)
Creates a new dir sync control.DirSyncControl(DirSyncControl.Flag[] f, byte[] value, int count, boolean critical)
Creates a new dir sync control.DirSyncControl(DirSyncControl.Flag[] f, int count)
Creates a new dir sync control.DirSyncControl(DirSyncControl.Flag[] f, int count, boolean critical)
Creates a new dir sync control.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
decode(DERBuffer encoded)
Initializes this response control with the supplied BER encoded data.byte[]
encode()
Provides the BER encoding of this control.boolean
equals(java.lang.Object o)
byte[]
getCookie()
Returns the sync request cookie.long
getFlags()
Returns the flags value.int
getMaxAttributeCount()
Returns the maximum attribute count.int
hashCode()
Returns the hash code for this object.boolean
hasValue()
Returns whether the control has a value associated with it.void
setCookie(byte[] value)
Sets the sync request cookie.void
setFlags(long l)
Sets the flags.void
setMaxAttributeCount(int count)
Sets the maximum attribute count.java.lang.String
toString()
-
Methods inherited from class org.ldaptive.control.AbstractControl
getCriticality, getOID
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.ldaptive.control.Control
getCriticality, getOID
-
-
-
-
Field Detail
-
OID
public static final java.lang.String OID
OID of this control.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
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 flagscritical
- whether this control is critical
-
DirSyncControl
public DirSyncControl(DirSyncControl.Flag[] f, int count)
Creates a new dir sync control.- Parameters:
f
- request flagscount
- maximum attribute count
-
DirSyncControl
public DirSyncControl(DirSyncControl.Flag[] f, int count, boolean critical)
Creates a new dir sync control.- Parameters:
f
- request flagscount
- maximum attribute countcritical
- whether this control is critical
-
DirSyncControl
public DirSyncControl(DirSyncControl.Flag[] f, byte[] value, boolean critical)
Creates a new dir sync control.- Parameters:
f
- request flagsvalue
- dir sync cookiecritical
- 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 flagsvalue
- dir sync cookiecount
- maximum attribute countcritical
- whether this control is critical
-
-
Method Detail
-
hasValue
public boolean hasValue()
Description copied from interface:RequestControl
Returns whether the control has a value associated with it.- Specified by:
hasValue
in interfaceRequestControl
- 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(java.lang.Object o)
- Overrides:
equals
in classAbstractControl
-
hashCode
public int hashCode()
Description copied from class:AbstractControl
Returns the hash code for this object.- Specified by:
hashCode
in classAbstractControl
- Returns:
- hash code
-
toString
public java.lang.String toString()
- Overrides:
toString
in classAbstractControl
-
encode
public byte[] encode()
Description copied from interface:RequestControl
Provides the BER encoding of this control.- Specified by:
encode
in interfaceRequestControl
- 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 interfaceResponseControl
- Parameters:
encoded
- BER encoded response control
-
-