Enum Class Outcome

java.lang.Object
java.lang.Enum<Outcome>
org.springframework.boot.actuate.metrics.http.Outcome
All Implemented Interfaces:
Serializable, Comparable<Outcome>, Constable

public enum Outcome extends Enum<Outcome>
The outcome of an HTTP request.
Since:
2.2.0
Author:
Andy Wilkinson
  • Enum Constant Details

    • INFORMATIONAL

      public static final Outcome INFORMATIONAL
      Outcome of the request was informational.
    • SUCCESS

      public static final Outcome SUCCESS
      Outcome of the request was success.
    • REDIRECTION

      public static final Outcome REDIRECTION
      Outcome of the request was redirection.
    • CLIENT_ERROR

      public static final Outcome CLIENT_ERROR
      Outcome of the request was client error.
    • SERVER_ERROR

      public static final Outcome SERVER_ERROR
      Outcome of the request was server error.
    • UNKNOWN

      public static final Outcome UNKNOWN
      Outcome of the request was unknown.
  • Method Details

    • values

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

      public static Outcome valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • asTag

      public io.micrometer.core.instrument.Tag asTag()
      Returns the Outcome as a Tag named outcome.
      Returns:
      the outcome Tag
    • forStatus

      public static Outcome forStatus(int status)
      Return the Outcome for the given HTTP status code.
      Parameters:
      status - the HTTP status code
      Returns:
      the matching Outcome