Enum FailureReason

java.lang.Object
java.lang.Enum<FailureReason>
ch.swisscom.mid.client.model.FailureReason
All Implemented Interfaces:
DocumentedEnum, Serializable, Comparable<FailureReason>, java.lang.constant.Constable

public enum FailureReason extends Enum<FailureReason> implements DocumentedEnum
Enum with all the main reasons for which a communication between the MID Client and a configured Mobile ID service can fail. A reason from this list is wrapped in a Fault and then wrapped again in a thrown exception of type MIDFlowException. Callers can inspect the Fault and one of these reasons and understand what failed. Some of these reasons will also put some extra info the Fault's fields.
  • Enum Constant Details

    • REQUEST_PREPARATION_FAILURE

      public static final FailureReason REQUEST_PREPARATION_FAILURE
    • HOST_CONNECTION_FAILURE

      public static final FailureReason HOST_CONNECTION_FAILURE
    • HOST_CONNECT_TIMEOUT_FAILURE

      public static final FailureReason HOST_CONNECT_TIMEOUT_FAILURE
    • HTTP_DATA_TRANSFER_FAILURE

      public static final FailureReason HTTP_DATA_TRANSFER_FAILURE
    • TLS_CONNECTION_FAILURE

      public static final FailureReason TLS_CONNECTION_FAILURE
    • HTTP_COMMUNICATION_FAILURE

      public static final FailureReason HTTP_COMMUNICATION_FAILURE
    • RESPONSE_TIMEOUT_FAILURE

      public static final FailureReason RESPONSE_TIMEOUT_FAILURE
    • RESPONSE_PARSING_FAILURE

      public static final FailureReason RESPONSE_PARSING_FAILURE
    • MID_SERVICE_FAILURE

      public static final FailureReason MID_SERVICE_FAILURE
    • MID_INVALID_RESPONSE_FAILURE

      public static final FailureReason MID_INVALID_RESPONSE_FAILURE
    • UNKNOWN_FAILURE

      public static final FailureReason UNKNOWN_FAILURE
  • Method Details

    • values

      public static FailureReason[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static FailureReason valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface DocumentedEnum
    • toString

      public String toString()
      Overrides:
      toString in class Enum<FailureReason>