Enum Class Outcome
- All Implemented Interfaces:
Serializable
,Comparable<Outcome>
,Constable
The outcome of an HTTP request.
- Since:
- 2.2.0
- Author:
- Andy Wilkinson
-
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.core.instrument.Tag
asTag()
Returns theOutcome
as aTag
namedoutcome
.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
public io.micrometer.core.instrument.Tag asTag()Returns theOutcome
as aTag
namedoutcome
.- Returns:
- the
outcome
Tag
-
forStatus
Return theOutcome
for the given HTTPstatus
code.- Parameters:
status
- the HTTP status code- Returns:
- the matching Outcome
-