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 int
hash value seed.static final String
OID of this control.private boolean
reload hint.private SyncRequestControl.Mode
request 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.boolean
byte[]
Returns the sync request cookie.boolean
Returns the reload hint.Returns the request mode.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
setReloadHint
(boolean b) Sets the reload hint.void
Sets the request mode.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 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:RequestControl
Returns whether the control has a value associated with it.- Specified by:
hasValue
in 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:
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
- 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
-