Constructor and Description |
---|
HealthStatusHttpMapper()
Create a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addStatusMapping(Map<String,Integer> statusMapping)
Add specific status mappings to the existing set.
|
void |
addStatusMapping(Status status,
Integer httpStatus)
Add a status mapping to the existing set.
|
void |
addStatusMapping(String statusCode,
Integer httpStatus)
Add a status mapping to the existing set.
|
Map<String,Integer> |
getStatusMapping()
Return an immutable view of the status mapping.
|
int |
mapStatus(Status status)
Map the specified
Status to an HTTP status code. |
void |
setStatusMapping(Map<String,Integer> statusMapping)
Set specific status mappings.
|
public void setStatusMapping(Map<String,Integer> statusMapping)
statusMapping
- a map of health status code to HTTP status codepublic void addStatusMapping(Map<String,Integer> statusMapping)
statusMapping
- a map of health status code to HTTP status codepublic void addStatusMapping(Status status, Integer httpStatus)
status
- the status to maphttpStatus
- the http statuspublic void addStatusMapping(String statusCode, Integer httpStatus)
statusCode
- the status code to maphttpStatus
- the http statuspublic Map<String,Integer> getStatusMapping()
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.