Package org.ldaptive.control
Class SyncRequestControl
- java.lang.Object
-
- org.ldaptive.control.AbstractControl
-
- org.ldaptive.control.SyncRequestControl
-
- All Implemented Interfaces:
Control
,RequestControl
public class SyncRequestControl extends AbstractControl implements 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 Modifier and Type Class Description static class
SyncRequestControl.Mode
Types of request modes.
-
Field Summary
Fields Modifier and Type Field Description private byte[]
cookie
server generated cookie.private static int
HASH_CODE_SEED
hash value seed.static String
OID
OID of this control.private boolean
reloadHint
reload hint.private SyncRequestControl.Mode
requestMode
request mode.-
Fields inherited from class org.ldaptive.control.AbstractControl
logger
-
-
Constructor Summary
Constructors Constructor Description SyncRequestControl()
Default constructor.SyncRequestControl(SyncRequestControl.Mode mode)
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
encode()
Provides the BER encoding of this control.boolean
equals(Object o)
byte[]
getCookie()
Returns the sync request cookie.boolean
getReloadHint()
Returns the reload hint.SyncRequestControl.Mode
getRequestMode()
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
setRequestMode(SyncRequestControl.Mode mode)
Sets the request mode.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 String OID
OID of this control.- See Also:
- Constant Field Values
-
HASH_CODE_SEED
private static final int HASH_CODE_SEED
hash value seed.- See Also:
- Constant Field Values
-
requestMode
private SyncRequestControl.Mode requestMode
request mode.
-
cookie
private byte[] cookie
server generated cookie.
-
reloadHint
private boolean reloadHint
reload hint.
-
-
Constructor Detail
-
SyncRequestControl
public SyncRequestControl()
Default constructor.
-
SyncRequestControl
public SyncRequestControl(SyncRequestControl.Mode mode)
Creates a new sync request control.- Parameters:
mode
- request mode
-
SyncRequestControl
public SyncRequestControl(SyncRequestControl.Mode mode, boolean critical)
Creates a new sync request control.- Parameters:
mode
- request modecritical
- whether this control is critical
-
SyncRequestControl
public SyncRequestControl(SyncRequestControl.Mode mode, byte[] value, boolean critical)
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 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
-
getRequestMode
public SyncRequestControl.Mode getRequestMode()
Returns the request mode.- Returns:
- request mode
-
setRequestMode
public void setRequestMode(SyncRequestControl.Mode mode)
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
public boolean equals(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 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
-
-