@ConfigurationProperties(prefix="endpoints.health") public class HealthMvcEndpoint extends AbstractEndpointMvcAdapter<HealthEndpoint> implements EnvironmentAware
HealthEndpoint
as an MvcEndpoint
.DISABLED_RESPONSE
Constructor and Description |
---|
HealthMvcEndpoint(HealthEndpoint delegate) |
HealthMvcEndpoint(HealthEndpoint delegate,
boolean secure) |
Modifier and Type | Method and Description |
---|---|
void |
addStatusMapping(Map<String,HttpStatus> statusMapping)
Add specific status mappings to the existing set.
|
void |
addStatusMapping(Status status,
HttpStatus httpStatus)
Add a status mapping to the existing set.
|
void |
addStatusMapping(String statusCode,
HttpStatus httpStatus)
Add a status mapping to the existing set.
|
Object |
invoke(Principal principal) |
void |
setEnvironment(Environment environment) |
void |
setStatusMapping(Map<String,HttpStatus> statusMapping)
Set specific status mappings.
|
getDelegate, getDisabledResponse, getEndpointType, getPath, invoke, isSensitive, setPath
public HealthMvcEndpoint(HealthEndpoint delegate)
public HealthMvcEndpoint(HealthEndpoint delegate, boolean secure)
public void setEnvironment(Environment environment)
setEnvironment
in interface EnvironmentAware
public void setStatusMapping(Map<String,HttpStatus> statusMapping)
statusMapping
- a map of status code to HttpStatus
public void addStatusMapping(Map<String,HttpStatus> statusMapping)
statusMapping
- a map of status code to HttpStatus
public void addStatusMapping(Status status, HttpStatus httpStatus)
status
- the status to maphttpStatus
- the http statuspublic void addStatusMapping(String statusCode, HttpStatus httpStatus)
statusCode
- the status code to maphttpStatus
- the http status@RequestMapping(produces="application/json") @ResponseBody public Object invoke(Principal principal)
Copyright © 2016 Pivotal Software, Inc.. All rights reserved.