Enum Class HttpOutcome
- All Implemented Interfaces:
Serializable,Comparable<HttpOutcome>,Constable
The outcome of an HTTP request.
Used as the "outcome" KeyValue
for HTTP observations.
- Since:
- 6.0
- Author:
- Brian Clozel, Andy Wilkinson
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum 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.KeyValueReturns theOutcomeas aKeyValuenamedoutcome.static HttpOutcomeforStatus(HttpStatusCode status) Return theHttpOutcomefor the given HTTPstatuscode.static HttpOutcomeReturns the enum constant of this class with the specified name.static HttpOutcome[]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
-
asKeyValue
public io.micrometer.common.KeyValue asKeyValue()Returns theOutcomeas aKeyValuenamedoutcome.- Returns:
- the
outcomeKeyValue
-
forStatus
Return theHttpOutcomefor the given HTTPstatuscode.- Parameters:
status- the HTTP status code- Returns:
- the matching HttpOutcome
-