Interface HttpCodeStatusMapper
- All Known Implementing Classes:
SimpleHttpCodeStatusMapper
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Strategy used to map a
health status
to an HTTP status code.- Since:
- 2.2.0
- Author:
- Stephane Nicoll, Phillip Webb
-
Field Summary
Modifier and TypeFieldDescriptionstatic final HttpCodeStatusMapper
AnHttpCodeStatusMapper
instance using default mappings. -
Method Summary
Modifier and TypeMethodDescriptionint
getStatusCode
(Status status) Return the HTTP status code that corresponds to the givenhealth status
.
-
Field Details
-
DEFAULT
AnHttpCodeStatusMapper
instance using default mappings.- Since:
- 2.3.0
-
-
Method Details
-
getStatusCode
Return the HTTP status code that corresponds to the givenhealth status
.- Parameters:
status
- the health status to map- Returns:
- the corresponding HTTP status code
-