@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class ContentSyncStateControl extends Control implements DecodeableControl
ContentSyncRequestControl
class for more information information
about using the content synchronization operation.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SYNC_STATE_OID
The OID (1.3.6.1.4.1.4203.1.9.1.2) for the sync state control.
|
Constructor and Description |
---|
ContentSyncStateControl(ContentSyncState state,
java.util.UUID entryUUID,
ASN1OctetString cookie)
Creates a new content synchronization state control that provides
information about a search result entry or referenced returned by a search
containing the content synchronization request control.
|
ContentSyncStateControl(java.lang.String oid,
boolean isCritical,
ASN1OctetString value)
Creates a new content synchronization state control which is decoded from
the provided information from a generic control.
|
Modifier and Type | Method and Description |
---|---|
ContentSyncStateControl |
decodeControl(java.lang.String oid,
boolean isCritical,
ASN1OctetString value)
Creates a new instance of this decodeable control from the provided
information.
|
static ContentSyncStateControl |
get(SearchResultEntry entry)
Extracts a content sync state control from the provided search result
entry.
|
static ContentSyncStateControl |
get(SearchResultReference ref)
Extracts a content sync state control from the provided search result
reference.
|
java.lang.String |
getControlName()
Retrieves the user-friendly name for this control, if available.
|
ASN1OctetString |
getCookie()
Retrieves a cookie providing updated state information for the
synchronization session, if available.
|
java.util.UUID |
getEntryUUID()
Retrieves the entryUUID for the associated search result entry or
reference.
|
ContentSyncState |
getState()
Retrieves the synchronization state for this control, which provides
information about the state of the associated search result entry or
reference.
|
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this LDAP control to the provided
buffer.
|
decode, decode, decodeControls, decodeJSONControl, deregisterDecodeableControl, encode, encodeControls, equals, getOID, getValue, hashCode, hasValue, isCritical, readFrom, registerDecodeableControl, registerDecodeableControl, toJSONControl, toString, writeTo
@NotNull public static final java.lang.String SYNC_STATE_OID
public ContentSyncStateControl(@NotNull ContentSyncState state, @NotNull java.util.UUID entryUUID, @Nullable ASN1OctetString cookie)
state
- The sync state for the associated entry or reference.
It must not be null
.entryUUID
- The entryUUID for the associated entry or reference. It
must not be null
.cookie
- A cookie with an updated synchronization state. It may
be null
if no updated state is available.public ContentSyncStateControl(@NotNull java.lang.String oid, boolean isCritical, @Nullable ASN1OctetString value) throws LDAPException
oid
- The OID for the control used to create this control.isCritical
- Indicates whether the control is marked critical.value
- The encoded value for the control.LDAPException
- If the provided control cannot be decoded as a
content synchronization state control.@NotNull public ContentSyncStateControl decodeControl(@NotNull java.lang.String oid, boolean isCritical, @Nullable ASN1OctetString value) throws LDAPException
decodeControl
in interface DecodeableControl
oid
- The OID for the control.isCritical
- Indicates whether the control should be marked
critical.value
- The encoded value for the control. This may be
null
if no value was provided.LDAPException
- If the provided information cannot be decoded as a
valid instance of this decodeable control.@Nullable public static ContentSyncStateControl get(@NotNull SearchResultEntry entry) throws LDAPException
entry
- The search result entry from which to retrieve the content
sync state control.null
if the entry did not contain a
content sync state control.LDAPException
- If a problem is encountered while attempting to
decode the content sync state control contained in
the provided search result entry.@Nullable public static ContentSyncStateControl get(@NotNull SearchResultReference ref) throws LDAPException
ref
- The search result reference from which to retrieve the content
sync state control.null
if the reference did not contain
a content sync state control.LDAPException
- If a problem is encountered while attempting to
decode the content sync state control contained in
the provided search result reference.@NotNull public ContentSyncState getState()
@NotNull public java.util.UUID getEntryUUID()
@Nullable public ASN1OctetString getCookie()
null
if none was included in
the control.@NotNull public java.lang.String getControlName()
getControlName
in class Control