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
FieldsModifier and TypeFieldDescriptionstatic final HttpCodeStatusMapperAnHttpCodeStatusMapperinstance using default mappings. -
Method Summary
Modifier and TypeMethodDescriptionintgetStatusCode(Status status) Return the HTTP status code that corresponds to the givenhealth status.
-
Field Details
-
DEFAULT
AnHttpCodeStatusMapperinstance 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
-