Class AssuredReplicationResponseControl

  • All Implemented Interfaces:
    DecodeableControl, java.io.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.
    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:
    AssuredReplicationRequestControl, Serialized Form
    • Constructor Detail

      • AssuredReplicationResponseControl

        public AssuredReplicationResponseControl​(@Nullable
                                                 AssuredReplicationLocalLevel localLevel,
                                                 boolean localAssuranceSatisfied,
                                                 @Nullable
                                                 java.lang.String localAssuranceMessage,
                                                 @Nullable
                                                 AssuredReplicationRemoteLevel remoteLevel,
                                                 boolean remoteAssuranceSatisfied,
                                                 @Nullable
                                                 java.lang.String remoteAssuranceMessage,
                                                 @Nullable
                                                 java.lang.String csn,
                                                 @Nullable
                                                 java.util.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 be null if 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 be null if no additional message is needed.
        remoteLevel - The remote assurance level selected by the server for the associated operation. It may be null if 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 be null if no additional message is needed.
        csn - The change sequence number (CSN) that has been assigned to the associated operation. It may be null if 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 be null or empty if no server results are available.
      • AssuredReplicationResponseControl

        public AssuredReplicationResponseControl​(@NotNull
                                                 java.lang.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 be null if no value was provided.
        Throws:
        LDAPException - If the provided control cannot be decoded as an assured replication response control.
    • Method Detail

      • 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 null if 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 java.util.List<AssuredReplicationResponseControlgetAll​(@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

        @Nullable
        public AssuredReplicationLocalLevel 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 null if this is not available.
      • localAssuranceSatisfied

        public boolean localAssuranceSatisfied()
        Indicates whether the desired local level of assurance is known to have been satisfied.
        Returns:
        true if the desired local level of assurance is known to have been satisfied, or false if not.
      • getLocalAssuranceMessage

        @Nullable
        public java.lang.String getLocalAssuranceMessage()
        Retrieves a message with additional information about local assurance processing, if available.
        Returns:
        A message with additional information about local assurance processing, or null if none is available.
      • getRemoteLevel

        @Nullable
        public AssuredReplicationRemoteLevel 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 null if the remote assurance level is not available.
      • remoteAssuranceSatisfied

        public boolean remoteAssuranceSatisfied()
        Indicates whether the desired remote level of assurance is known to have been satisfied.
        Returns:
        true if the desired remote level of assurance is known to have been satisfied, or false if not.
      • getRemoteAssuranceMessage

        @Nullable
        public java.lang.String getRemoteAssuranceMessage()
        Retrieves a message with additional information about remote assurance processing, if available.
        Returns:
        A message with additional information about remote assurance processing, or null if none is available.
      • getCSN

        @Nullable
        public java.lang.String 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 null if the CSN is not available.
      • getServerResults

        @NotNull
        public java.util.List<AssuredReplicationServerResultgetServerResults()
        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

        @NotNull
        public java.lang.String 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:
        getControlName in class Control
        Returns:
        The user-friendly name for this control, or the OID if no user-friendly name is available.
      • toString

        public void toString​(@NotNull
                             java.lang.StringBuilder buffer)
        Appends a string representation of this LDAP control to the provided buffer.
        Overrides:
        toString in class Control
        Parameters:
        buffer - The buffer to which to append the string representation of this buffer.