public class HealthMvcEndpoint extends Object implements MvcEndpoint, 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.
|
Class<? extends Endpoint> |
getEndpointType()
Return the type of
Endpoint exposed, or null if this
MvcEndpoint exposes information that cannot be represented as a traditional
Endpoint. |
String |
getPath()
Return the MVC path of the endpoint.
|
Object |
invoke(Principal principal) |
boolean |
isSensitive()
Return if the endpoint exposes sensitive information.
|
void |
setEnvironment(Environment environment) |
void |
setStatusMapping(Map<String,HttpStatus> statusMapping)
Set specific status mappings.
|
public HealthMvcEndpoint(HealthEndpoint delegate)
public HealthMvcEndpoint(HealthEndpoint delegate, boolean secure)
public void setEnvironment(Environment environment)
setEnvironment in interface EnvironmentAwarepublic void setStatusMapping(Map<String,HttpStatus> statusMapping)
statusMapping - a map of status code to HttpStatuspublic void addStatusMapping(Map<String,HttpStatus> statusMapping)
statusMapping - a map of status code to HttpStatuspublic 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 @ResponseBody public Object invoke(Principal principal)
public String getPath()
MvcEndpointgetPath in interface MvcEndpointpublic boolean isSensitive()
MvcEndpointisSensitive in interface MvcEndpointpublic Class<? extends Endpoint> getEndpointType()
MvcEndpointEndpoint exposed, or null if this
MvcEndpoint exposes information that cannot be represented as a traditional
Endpoint.getEndpointType in interface MvcEndpointCopyright © 2015 Pivotal Software, Inc.. All rights reserved.