Class RequestFailure<T extends org.opendaylight.yangtools.concepts.WritableIdentifier,C extends RequestFailure<T,C>>

Type Parameters:
T - Target identifier type
C - Message class
All Implemented Interfaces:
Serializable, org.opendaylight.yangtools.concepts.Immutable
Direct Known Subclasses:
ConnectClientFailure, LocalHistoryFailure, TransactionFailure

public abstract class RequestFailure<T extends org.opendaylight.yangtools.concepts.WritableIdentifier,C extends RequestFailure<T,C>> extends Response<T,C>
A failure response to a Request. Contains a RequestException detailing the cause for this failure.
See Also:
  • Constructor Details

    • RequestFailure

      protected RequestFailure(@NonNull C failure, @NonNull ABIVersion version)
    • RequestFailure

      protected RequestFailure(@NonNull T target, long sequence, @NonNull RequestException cause)
  • Method Details

    • getCause

      public final @NonNull RequestException getCause()
      Return the failure cause.
      Returns:
      Failure cause.
    • isHardFailure

      public final boolean isHardFailure()
      Return an indication of whether this a hard failure. Hard failures must not be retried but need to be treated as authoritative response to a request.
      Returns:
      True if this represents a hard failure, false otherwise.
    • addToStringAttributes

      protected com.google.common.base.MoreObjects.ToStringHelper addToStringAttributes(com.google.common.base.MoreObjects.ToStringHelper toStringHelper)
      Description copied from class: Message
      Add attributes to the output of Message.toString(). Subclasses wanting to contribute additional information should override this method. Any null attributes will be omitted from the output.
      Overrides:
      addToStringAttributes in class Message<T extends org.opendaylight.yangtools.concepts.WritableIdentifier,C extends RequestFailure<T,C>>
      Parameters:
      toStringHelper - a MoreObjects.ToStringHelper instance
      Returns:
      The MoreObjects.ToStringHelper passed in as argument
    • externalizableProxy

      protected abstract RequestFailure.SerialForm<T,C> externalizableProxy(ABIVersion version)
      Description copied from class: Message
      Instantiate a serialization proxy for this object for the target ABI version. Implementations should return different objects for incompatible ABIVersions. This method should never fail, as any compatibility checks should have been done by Message.cloneAsVersion(ABIVersion).
      Specified by:
      externalizableProxy in class Message<T extends org.opendaylight.yangtools.concepts.WritableIdentifier,C extends RequestFailure<T,C>>
      Parameters:
      version - Requested ABI version
      Returns:
      Proxy for this object