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 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description private static classDirSyncControl.CookieHandlerParse handler implementation for the cookie.static classDirSyncControl.FlagTypes of flags.private static classDirSyncControl.FlagHandlerParse handler implementation for the flag.private static classDirSyncControl.MaxAttrCountHandlerParse handler implementation for the maxAttributeCount.
 - 
Field SummaryFields Modifier and Type Field Description private byte[]cookieserver generated cookie.private static byte[]EMPTY_COOKIEEmpty byte array used for null cookies.private longflagsflags.private static intHASH_CODE_SEEDhash value seed.private intmaxAttributeCountmaximum attribute count.static StringOIDOID of this control.- 
Fields inherited from class org.ldaptive.control.AbstractControllogger
 
- 
 - 
Constructor SummaryConstructors 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 SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecode(DERBuffer encoded)Initializes this response control with the supplied BER encoded data.byte[]encode()Provides the BER encoding of this control.booleanequals(Object o)byte[]getCookie()Returns the sync request cookie.longgetFlags()Returns the flags value.intgetMaxAttributeCount()Returns 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.StringtoString()- 
Methods inherited from class org.ldaptive.control.AbstractControlgetCriticality, getOID
 - 
Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.ldaptive.control.ControlgetCriticality, getOID
 
- 
 
- 
- 
- 
Field Detail- 
OIDpublic static final String OID OID of this control.- See Also:
- Constant Field Values
 
 - 
HASH_CODE_SEEDprivate static final int HASH_CODE_SEED hash value seed.- See Also:
- Constant Field Values
 
 - 
EMPTY_COOKIEprivate static final byte[] EMPTY_COOKIE Empty byte array used for null cookies.
 - 
flagsprivate long flags flags.
 - 
maxAttributeCountprivate int maxAttributeCount maximum attribute count.
 - 
cookieprivate byte[] cookie server generated cookie.
 
- 
 - 
Constructor Detail- 
DirSyncControlpublic DirSyncControl() Default constructor.
 - 
DirSyncControlpublic DirSyncControl(boolean critical) Creates a new dir sync control.- Parameters:
- critical- whether this control is critical
 
 - 
DirSyncControlpublic DirSyncControl(DirSyncControl.Flag[] f) Creates a new dir sync control.- Parameters:
- f- request flags
 
 - 
DirSyncControlpublic DirSyncControl(DirSyncControl.Flag[] f, boolean critical) Creates a new dir sync control.- Parameters:
- f- request flags
- critical- whether this control is critical
 
 - 
DirSyncControlpublic DirSyncControl(DirSyncControl.Flag[] f, int count) Creates a new dir sync control.- Parameters:
- f- request flags
- count- maximum attribute count
 
 - 
DirSyncControlpublic 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
 
 - 
DirSyncControlpublic 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
 
 - 
DirSyncControlpublic 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 Detail- 
hasValuepublic boolean hasValue() Description copied from interface:RequestControlReturns whether the control has a value associated with it.- Specified by:
- hasValuein interface- RequestControl
- Returns:
- whether the control has a value
 
 - 
getFlagspublic long getFlags() Returns the flags value.- Returns:
- flags value
 
 - 
setFlagspublic void setFlags(long l) Sets the flags.- Parameters:
- l- flags value
 
 - 
getMaxAttributeCountpublic int getMaxAttributeCount() Returns the maximum attribute count.- Returns:
- maximum attribute count
 
 - 
setMaxAttributeCountpublic void setMaxAttributeCount(int count) Sets the maximum attribute count.- Parameters:
- count- maximum attribute count
 
 - 
getCookiepublic byte[] getCookie() Returns the sync request cookie.- Returns:
- sync request cookie
 
 - 
setCookiepublic void setCookie(byte[] value) Sets the sync request cookie.- Parameters:
- value- sync request cookie
 
 - 
equalspublic boolean equals(Object o) - Overrides:
- equalsin class- AbstractControl
 
 - 
hashCodepublic int hashCode() Description copied from class:AbstractControlReturns the hash code for this object.- Specified by:
- hashCodein class- AbstractControl
- Returns:
- hash code
 
 - 
toStringpublic String toString() - Overrides:
- toStringin class- AbstractControl
 
 - 
encodepublic byte[] encode() Description copied from interface:RequestControlProvides the BER encoding of this control.- Specified by:
- encodein interface- RequestControl
- Returns:
- BER encoded request control
 
 - 
decodepublic void decode(DERBuffer encoded) Description copied from interface:ResponseControlInitializes this response control with the supplied BER encoded data.- Specified by:
- decodein interface- ResponseControl
- Parameters:
- encoded- BER encoded response control
 
 
- 
 
-