Class SimpleHttpCodeStatusMapper
java.lang.Object
org.springframework.boot.health.actuate.endpoint.SimpleHttpCodeStatusMapper
- All Implemented Interfaces:
HttpCodeStatusMapper
@Deprecated(since="4.1.0",
forRemoval=true)
public class SimpleHttpCodeStatusMapper
extends Object
implements HttpCodeStatusMapper
Deprecated, for removal: This API element is subject to removal in a future version.
Simple
HttpCodeStatusMapper backed by map of status
code to HTTP status code.- Since:
- 4.0.0
- Author:
- Stephane Nicoll, Phillip Webb
-
Field Summary
Fields inherited from interface HttpCodeStatusMapper
DEFAULT -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Create a newSimpleHttpCodeStatusMapperinstance using default mappings.SimpleHttpCodeStatusMapper(@Nullable Map<String, Integer> mappings) Deprecated, for removal: This API element is subject to removal in a future version.Create a newSimpleHttpCodeStatusMapperwith the specified mappings. -
Method Summary
Modifier and TypeMethodDescriptionintgetStatusCode(Status status) Deprecated, for removal: This API element is subject to removal in a future version.Return the HTTP status code that corresponds to the givenhealth status.
-
Constructor Details
-
SimpleHttpCodeStatusMapper
public SimpleHttpCodeStatusMapper()Deprecated, for removal: This API element is subject to removal in a future version.Create a newSimpleHttpCodeStatusMapperinstance using default mappings. -
SimpleHttpCodeStatusMapper
Deprecated, for removal: This API element is subject to removal in a future version.Create a newSimpleHttpCodeStatusMapperwith the specified mappings.- Parameters:
mappings- the mappings to use ornullto use the default mappings
-
-
Method Details
-
getStatusCode
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:HttpCodeStatusMapperReturn the HTTP status code that corresponds to the givenhealth status.- Specified by:
getStatusCodein interfaceHttpCodeStatusMapper- Parameters:
status- the health status to map- Returns:
- the corresponding HTTP status code
-
HttpCodeStatusMapper.of(Map)