Enum Class Outcome
- All Implemented Interfaces:
Serializable
,Comparable<Outcome>
,Constable
The outcome of an HTTP request.
- Since:
- 1.4.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionOutcome of the request was client error.Outcome of the request was informational.Outcome of the request was redirection.Outcome of the request was server error.Outcome of the request was success.Outcome of the request was unknown. -
Method Summary
Modifier and TypeMethodDescriptionio.micrometer.common.KeyValue
Returns theOutcome
as aKeyValue
namedoutcome
.asTag()
static Outcome
forStatus
(int status) Return theOutcome
for the given HTTPstatus
code.static Outcome
Returns the enum constant of this class with the specified name.static Outcome[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INFORMATIONAL
Outcome of the request was informational. -
SUCCESS
Outcome of the request was success. -
REDIRECTION
Outcome of the request was redirection. -
CLIENT_ERROR
Outcome of the request was client error. -
SERVER_ERROR
Outcome of the request was server error. -
UNKNOWN
Outcome of the request was unknown.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
asTag
- Returns:
- the
outcome
Tag
-
asKeyValue
public io.micrometer.common.KeyValue asKeyValue()Returns theOutcome
as aKeyValue
namedoutcome
.- Returns:
- the
outcome
KeyValue
- Since:
- 1.11.0
-
forStatus
Return theOutcome
for the given HTTPstatus
code.- Parameters:
status
- the HTTP status code- Returns:
- the matching Outcome
-