Package org.ldaptive.ad.control
Class DirSyncControl
java.lang.Object
org.ldaptive.control.AbstractControl
org.ldaptive.control.AbstractResponseControl
org.ldaptive.ad.control.DirSyncControl
- All Implemented Interfaces:
Control,RequestControl,ResponseControl,Freezable
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classParse handler implementation for the cookie.static enumTypes of flags.private static classParse handler implementation for the flag.private static classParse handler implementation for the maxAttributeCount. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate byte[]server generated cookie.private static final byte[]Empty byte array used for null cookies.private longflags.private static final inthash value seed.private intmaximum attribute count.static final StringOID of this control.Fields inherited from class org.ldaptive.control.AbstractControl
logger -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.DirSyncControl(boolean critical) Creates a new dir sync control.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
Modifier and TypeMethodDescriptionvoidInitializes this response control with the supplied BER encoded data.byte[]encode()Provides the BER encoding of this control.booleanbyte[]Returns the sync request cookie.longgetFlags()Returns the flags value.intReturns the maximum attribute count.inthashCode()Returns the hash code for this object.booleanhasValue()Returns whether the control has a value associated with it.voidsetCookie(byte[] value) Sets the sync request cookie.voidsetFlags(long l) Sets the flags.voidsetMaxAttributeCount(int count) Sets the maximum attribute count.toString()Methods inherited from class org.ldaptive.control.AbstractResponseControl
assertMutable, freeze, freezeAndAssertMutable, isFrozenMethods inherited from class org.ldaptive.control.AbstractControl
getCriticality, getOIDMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.ldaptive.control.Control
getCriticality, getOID
-
Field Details
-
OID
OID of this control.- See Also:
-
HASH_CODE_SEED
private static final int HASH_CODE_SEEDhash value seed.- See Also:
-
EMPTY_COOKIE
private static final byte[] EMPTY_COOKIEEmpty byte array used for null cookies. -
flags
private long flagsflags. -
maxAttributeCount
private int maxAttributeCountmaximum attribute count. -
cookie
private byte[] cookieserver generated cookie.
-
-
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
Creates a new dir sync control.- Parameters:
f- request flags
-
DirSyncControl
Creates a new dir sync control.- Parameters:
f- request flagscritical- whether this control is critical
-
DirSyncControl
Creates a new dir sync control.- Parameters:
f- request flagscount- maximum attribute count
-
DirSyncControl
Creates a new dir sync control.- Parameters:
f- request flagscount- maximum attribute countcritical- whether this control is critical
-
DirSyncControl
Creates a new dir sync control.- Parameters:
f- request flagsvalue- dir sync cookiecritical- whether this control is critical
-
DirSyncControl
Creates a new dir sync control.- Parameters:
f- request flagsvalue- dir sync cookiecount- maximum attribute countcritical- whether this control is critical
-
-
Method Details
-
hasValue
public boolean hasValue()Description copied from interface:RequestControlReturns whether the control has a value associated with it.- Specified by:
hasValuein 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
- Overrides:
equalsin classAbstractControl
-
hashCode
public int hashCode()Description copied from class:AbstractControlReturns the hash code for this object.- Specified by:
hashCodein classAbstractControl- Returns:
- hash code
-
toString
- Overrides:
toStringin classAbstractControl
-
encode
public byte[] encode()Description copied from interface:RequestControlProvides the BER encoding of this control.- Specified by:
encodein interfaceRequestControl- Returns:
- BER encoded request control
-
decode
Description copied from interface:ResponseControlInitializes this response control with the supplied BER encoded data.- Specified by:
decodein interfaceResponseControl- Parameters:
encoded- BER encoded response control
-