Class AssuredReplicationResponseControl
java.lang.Object
com.unboundid.ldap.sdk.Control
com.unboundid.ldap.sdk.unboundidds.controls.AssuredReplicationResponseControl
- All Implemented Interfaces:
DecodeableControl,Serializable
@NotMutable
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public final class AssuredReplicationResponseControl
extends Control
implements DecodeableControl
This class provides an implementation of an LDAP control that can be included
in add, bind, modify, modify DN, and certain extended responses to provide
information about the result of replication assurance processing for that
operation.
The OID for this control is 1.3.6.1.4.1.30221.2.5.29. It will have a criticality of FALSE, and will have a value with the following encoding:
NOTE: This class, and other classes within the
com.unboundid.ldap.sdk.unboundidds package structure, are only
supported for use against Ping Identity, UnboundID, and
Nokia/Alcatel-Lucent 8661 server products. These classes provide support
for proprietary functionality or for external specifications that are not
considered stable or mature enough to be guaranteed to work in an
interoperable way with other types of LDAP servers.
The OID for this control is 1.3.6.1.4.1.30221.2.5.29. It will have a criticality of FALSE, and will have a value with the following encoding:
AssuredReplicationResponse ::= SEQUENCE {
localLevel [0] LocalLevel OPTIONAL,
localAssuranceSatisfied [1] BOOLEAN,
localAssuranceMessage [2] OCTET STRING OPTIONAL,
remoteLevel [3] RemoteLevel OPTIONAL,
remoteAssuranceSatisfied [4] BOOLEAN,
remoteAssuranceMessage [5] OCTET STRING OPTIONAL,
csn [6] OCTET STRING OPTIONAL,
serverResults [7] SEQUENCE OF ServerResult OPTIONAL,
... }
ServerResult ::= SEQUENCE {
resultCode [0] ENUMERATED {
complete (0),
timeout (1),
conflict (2),
serverShutdown (3),
unavailable (4),
duplicate (5),
... },
replicationServerID [1] INTEGER OPTIONAL,
replicaID [2] INTEGER OPTIONAL,
... }
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe OID (1.3.6.1.4.1.30221.2.5.29) for the assured replication response control. -
Constructor Summary
ConstructorsConstructorDescriptionAssuredReplicationResponseControl(AssuredReplicationLocalLevel localLevel, boolean localAssuranceSatisfied, String localAssuranceMessage, AssuredReplicationRemoteLevel remoteLevel, boolean remoteAssuranceSatisfied, String remoteAssuranceMessage, String csn, Collection<AssuredReplicationServerResult> serverResults) Creates a new assured replication response control with the provided information.AssuredReplicationResponseControl(String oid, boolean isCritical, ASN1OctetString value) Creates a new assured replication response control with the provided information. -
Method Summary
Modifier and TypeMethodDescriptiondecodeControl(String oid, boolean isCritical, ASN1OctetString value) Creates a new instance of this decodeable control from the provided information.decodeJSONControl(JSONObject controlObject, boolean strict) Attempts to decode the provided object as a JSON representation of an assured replication response control.get(LDAPResult result) Extracts an assured replication response control from the provided LDAP result.getAll(LDAPResult result) Extracts all assured replication response controls from the provided LDAP result.Retrieves the user-friendly name for this control, if available.getCSN()Retrieves the replication change sequence number (CSN) assigned to the associated operation, if available.Retrieves a message with additional information about local assurance processing, if available.Retrieves the local assurance level selected by the server for the associated operation, if available.Retrieves a message with additional information about remote assurance processing, if available.Retrieves the remote assurance level selected by the server for the associated operation, if available.Retrieves a list of the results from individual replication servers and/or directory servers used in assurance processing.booleanIndicates whether the desired local level of assurance is known to have been satisfied.booleanIndicates whether the desired remote level of assurance is known to have been satisfied.Retrieves a representation of this assured replication response control as a JSON object.voidtoString(StringBuilder buffer) Appends a string representation of this LDAP control to the provided buffer.Methods inherited from class com.unboundid.ldap.sdk.Control
decode, decode, decodeControls, decodeJSONControl, deregisterDecodeableControl, encode, encodeControls, equals, getOID, getValue, hashCode, hasValue, isCritical, readFrom, registerDecodeableControl, registerDecodeableControl, toString, writeTo
-
Field Details
-
ASSURED_REPLICATION_RESPONSE_OID
The OID (1.3.6.1.4.1.30221.2.5.29) for the assured replication response control.- See Also:
-
-
Constructor Details
-
AssuredReplicationResponseControl
public AssuredReplicationResponseControl(@Nullable AssuredReplicationLocalLevel localLevel, boolean localAssuranceSatisfied, @Nullable String localAssuranceMessage, @Nullable AssuredReplicationRemoteLevel remoteLevel, boolean remoteAssuranceSatisfied, @Nullable String remoteAssuranceMessage, @Nullable String csn, @Nullable Collection<AssuredReplicationServerResult> serverResults) Creates a new assured replication response control with the provided information.- Parameters:
localLevel- The local assurance level selected by the server for the associated operation. It may benullif this is not available.localAssuranceSatisfied- Indicates whether the desired local level of assurance is known to have been satisfied.localAssuranceMessage- An optional message providing additional information about local assurance processing. This may benullif no additional message is needed.remoteLevel- The remote assurance level selected by the server for the associated operation. It may benullif this is not available.remoteAssuranceSatisfied- Indicates whether the desired remote level of assurance is known to have been satisfied.remoteAssuranceMessage- An optional message providing additional information about remote assurance processing. This may benullif no additional message is needed.csn- The change sequence number (CSN) that has been assigned to the associated operation. It may benullif no CSN is available.serverResults- The set of individual results from the local and/or remote replication servers and/or directory servers used in assurance processing. This may benullor empty if no server results are available.
-
AssuredReplicationResponseControl
public AssuredReplicationResponseControl(@NotNull String oid, boolean isCritical, @Nullable ASN1OctetString value) throws LDAPException Creates a new assured replication response control with the provided information.- Parameters:
oid- The OID for the control.isCritical- Indicates whether the control should be marked critical.value- The encoded value for the control. This may benullif no value was provided.- Throws:
LDAPException- If the provided control cannot be decoded as an assured replication response control.
-
-
Method Details
-
decodeControl
@NotNull public AssuredReplicationResponseControl decodeControl(@NotNull String oid, boolean isCritical, @Nullable ASN1OctetString value) throws LDAPException Creates a new instance of this decodeable control from the provided information.- Specified by:
decodeControlin interfaceDecodeableControl- Parameters:
oid- The OID for the control.isCritical- Indicates whether the control should be marked critical.value- The encoded value for the control. This may benullif no value was provided.- Returns:
- The decoded representation of this control.
- Throws:
LDAPException- If the provided information cannot be decoded as a valid instance of this decodeable control.
-
get
@Nullable public static AssuredReplicationResponseControl get(@NotNull LDAPResult result) throws LDAPException Extracts an assured replication response control from the provided LDAP result. If there are multiple assured replication response controls included in the result, then only the first will be returned.- Parameters:
result- The LDAP result from which to retrieve the assured replication response control.- Returns:
- The assured replication response control contained in the provided
LDAP result, or
nullif the result did not contain an assured replication response control. - Throws:
LDAPException- If a problem is encountered while attempting to decode the assured replication response control contained in the provided result.
-
getAll
@NotNull public static List<AssuredReplicationResponseControl> getAll(@NotNull LDAPResult result) throws LDAPException Extracts all assured replication response controls from the provided LDAP result.- Parameters:
result- The LDAP result from which to retrieve the assured replication response controls.- Returns:
- A list containing the assured replication response controls contained in the provided LDAP result, or an empty list if the result did not contain any assured replication response control.
- Throws:
LDAPException- If a problem is encountered while attempting to decode any assured replication response control contained in the provided result.
-
getLocalLevel
Retrieves the local assurance level selected by the server for the associated operation, if available.- Returns:
- The local assurance level selected by the server for the
associated operation, or
nullif this is not available.
-
localAssuranceSatisfied
Indicates whether the desired local level of assurance is known to have been satisfied.- Returns:
trueif the desired local level of assurance is known to have been satisfied, orfalseif not.
-
getLocalAssuranceMessage
Retrieves a message with additional information about local assurance processing, if available.- Returns:
- A message with additional information about local assurance
processing, or
nullif none is available.
-
getRemoteLevel
Retrieves the remote assurance level selected by the server for the associated operation, if available.- Returns:
- The remote assurance level selected by the server for the
associated operation, or
nullif the remote assurance level is not available.
-
remoteAssuranceSatisfied
Indicates whether the desired remote level of assurance is known to have been satisfied.- Returns:
trueif the desired remote level of assurance is known to have been satisfied, orfalseif not.
-
getRemoteAssuranceMessage
Retrieves a message with additional information about remote assurance processing, if available.- Returns:
- A message with additional information about remote assurance
processing, or
nullif none is available.
-
getCSN
Retrieves the replication change sequence number (CSN) assigned to the associated operation, if available.- Returns:
- The replication CSN assigned to the associated operation, or
nullif the CSN is not available.
-
getServerResults
Retrieves a list of the results from individual replication servers and/or directory servers used in assurance processing. It may be empty if no server results are available.- Returns:
- A list of the results from individual replication servers and/or directory servers used in assurance processing.
-
getControlName
Retrieves the user-friendly name for this control, if available. If no user-friendly name has been defined, then the OID will be returned.- Overrides:
getControlNamein classControl- Returns:
- The user-friendly name for this control, or the OID if no user-friendly name is available.
-
toJSONControl
Retrieves a representation of this assured replication response control as a JSON object. The JSON object uses the following fields:-
oid-- A mandatory string field whose value is the object identifier for this control. For the assured replication response control, the OID is "1.3.6.1.4.1.30221.2.5.29". -
control-name-- An optional string field whose value is a human-readable name for this control. This field is only intended for descriptive purposes, and when decoding a control, theoidfield should be used to identify the type of control. -
criticality-- A mandatory Boolean field used to indicate whether this control is considered critical. -
value-base64-- An optional string field whose value is a base64-encoded representation of the raw value for this assured replication response control. Exactly one of thevalue-base64andvalue-jsonfields must be present. -
value-json-- An optional JSON object field whose value is a user-friendly representation of the value for this assured replication response control. Exactly one of thevalue-base64andvalue-jsonfields must be present, and if thevalue-jsonfield is used, then it will use the following fields:-
local-level-- An optional string field whose value is the local assurance level used for the operation. If present, its value will be one of "none", "received-any-server", or "processed-all-servers". -
local-assurance-satisfied-- A Boolean field that indicates whether local assurance was satisfied for the operation. -
local-assurance-message-- An optional string field whose value is a message that provides additional information about the local assurance processing. -
remote-level-- An optional string field whose value is the remote assurance level used for the operation. If present, its value will be one of "none", "received-any-remote-location", "received-all-remote-locations", or "processed-all-remote-servers". -
remote-assurance-satisfied-- A Boolean field that indicates whether remote assurance was satisfied for the operation. -
remote-assurance-message-- An optional string field whose value is a message that provides additional information about the remote assurance processing. -
csn-- An optional string field whose value is the change sequence number that the server assigned for the operation. -
server-results-- An optional array field whose values are JSON objects with information about the individual results from the local and/or remote servers used in replication assurance processing. These JSON objects will use the following fields:-
result-code-value-- An integer field whose value is the numeric value for theAssuredReplicationServerResultCodefor the server result. -
result-code-name-- An optional string field whose value is the name of the result code for the server result. -
replication-server-id-- An optional integer field whose value is the server ID for the associated replication server. -
replica-id-- An optional integer field whose value is the replica ID for the associated replica.
-
-
- Overrides:
toJSONControlin classControl- Returns:
- A JSON object that contains a representation of this control.
-
-
decodeJSONControl
@NotNull public static AssuredReplicationResponseControl decodeJSONControl(@NotNull JSONObject controlObject, boolean strict) throws LDAPException Attempts to decode the provided object as a JSON representation of an assured replication response control.- Parameters:
controlObject- The JSON object to be decoded. It must not benull.strict- Indicates whether to use strict mode when decoding the provided JSON object. If this istrue, then this method will throw an exception if the provided JSON object contains any unrecognized fields. If this isfalse, then unrecognized fields will be ignored.- Returns:
- The assured replication control that was decoded from the provided JSON object.
- Throws:
LDAPException- If the provided JSON object cannot be parsed as a valid assured replication response control.
-
toString
Appends a string representation of this LDAP control to the provided buffer.
-