public class SimpleHttpCodeStatusMapper extends Object implements HttpCodeStatusMapper
HttpCodeStatusMapper
backed by map of status
code
to HTTP status code.Constructor and Description |
---|
SimpleHttpCodeStatusMapper()
Create a new
SimpleHttpCodeStatusMapper instance using default mappings. |
SimpleHttpCodeStatusMapper(Map<String,Integer> mappings)
Create a new
SimpleHttpCodeStatusMapper with the specified mappings. |
Modifier and Type | Method and Description |
---|---|
int |
getStatusCode(Status status)
Return the HTTP status code that corresponds to the given
health
status . |
public SimpleHttpCodeStatusMapper()
SimpleHttpCodeStatusMapper
instance using default mappings.public SimpleHttpCodeStatusMapper(Map<String,Integer> mappings)
SimpleHttpCodeStatusMapper
with the specified mappings.mappings
- the mappings to use or null
to use the default mappingspublic int getStatusCode(Status status)
HttpCodeStatusMapper
health
status
.getStatusCode
in interface HttpCodeStatusMapper
status
- the health status to mapCopyright © 2021 Pivotal Software, Inc.. All rights reserved.