Package org.ldaptive.control
Class SyncRequestControl
java.lang.Object
org.ldaptive.control.AbstractControl
org.ldaptive.control.SyncRequestControl
- All Implemented Interfaces:
Control,RequestControl
Request control for ldap content synchronization. See RFC 4533. Control is defined as:
syncRequestValue ::= SEQUENCE {
mode ENUMERATED {
-- 0 unused
refreshOnly (1),
-- 2 reserved
refreshAndPersist (3)
},
cookie syncCookie OPTIONAL,
reloadHint BOOLEAN DEFAULT FALSE
}
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate byte[]server generated cookie.private static final inthash value seed.static final StringOID of this control.private booleanreload hint.private SyncRequestControl.Moderequest mode.Fields inherited from class org.ldaptive.control.AbstractControl
logger -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.Creates a new sync request control.SyncRequestControl(SyncRequestControl.Mode mode, boolean critical) Creates a new sync request control.SyncRequestControl(SyncRequestControl.Mode mode, byte[] value, boolean critical) Creates a new sync request control.SyncRequestControl(SyncRequestControl.Mode mode, byte[] value, boolean hint, boolean critical) Creates a new sync request control. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]encode()Provides the BER encoding of this control.booleanbyte[]Returns the sync request cookie.booleanReturns the reload hint.Returns the request mode.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.voidsetReloadHint(boolean b) Sets the reload hint.voidSets the request mode.toString()Methods 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:
-
requestMode
request mode. -
cookie
private byte[] cookieserver generated cookie. -
reloadHint
private boolean reloadHintreload hint.
-
-
Constructor Details
-
SyncRequestControl
public SyncRequestControl()Default constructor. -
SyncRequestControl
Creates a new sync request control.- Parameters:
mode- request mode
-
SyncRequestControl
Creates a new sync request control.- Parameters:
mode- request modecritical- whether this control is critical
-
SyncRequestControl
Creates a new sync request control.- Parameters:
mode- request modevalue- sync request cookiecritical- whether this control is critical
-
SyncRequestControl
public SyncRequestControl(SyncRequestControl.Mode mode, byte[] value, boolean hint, boolean critical) Creates a new sync request control.- Parameters:
mode- request modevalue- sync request cookiehint- reload hintcritical- 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
-
getRequestMode
Returns the request mode.- Returns:
- request mode
-
setRequestMode
Sets the request mode.- Parameters:
mode- request mode
-
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
-
getReloadHint
public boolean getReloadHint()Returns the reload hint.- Returns:
- reload hint
-
setReloadHint
public void setReloadHint(boolean b) Sets the reload hint.- Parameters:
b- reload hint
-
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
-