Class AbstractEndpointMvcAdapter<E extends Endpoint<?>>
- java.lang.Object
- org.springframework.boot.actuate.endpoint.mvc.AbstractEndpointMvcAdapter<E>
- Type Parameters:
E
- The delegate endpoint
- All Implemented Interfaces:
MvcEndpoint
,NamedMvcEndpoint
- Direct Known Subclasses:
EndpointMvcAdapter
,HealthMvcEndpoint
public abstract class AbstractEndpointMvcAdapter<E extends Endpoint<?>> extends Object implements NamedMvcEndpoint
Abstract base class forMvcEndpoint
implementations.- Since:
- 1.3.0
Field Summary
Fields inherited from interface org.springframework.boot.actuate.endpoint.mvc.MvcEndpoint
DISABLED_RESPONSE
Constructor Summary
Constructors Constructor Description AbstractEndpointMvcAdapter(E delegate)
Create a newEndpointMvcAdapter
.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description E
getDelegate()
protected org.springframework.http.ResponseEntity<?>
getDisabledResponse()
Returns the response that should be returned when the endpoint is disabled.Class<? extends Endpoint>
getEndpointType()
Return the type ofEndpoint
exposed, ornull
if thisMvcEndpoint
exposes information that cannot be represented as a traditionalEndpoint
.String
getName()
Return the logical name of the endpoint.String
getPath()
Return the MVC path of the endpoint.protected Object
invoke()
boolean
isSensitive()
Return if the endpoint exposes sensitive information.void
setPath(String path)
Constructor Detail
AbstractEndpointMvcAdapter
public AbstractEndpointMvcAdapter(E delegate)
Create a newEndpointMvcAdapter
.- Parameters:
delegate
- the underlyingEndpoint
to adapt.
Method Detail
getDelegate
public E getDelegate()
getName
public String getName()
Description copied from interface:NamedMvcEndpoint
Return the logical name of the endpoint. Names should be non-null, non-empty, alpha-numeric values.- Specified by:
getName
in interfaceNamedMvcEndpoint
- Returns:
- the logical name of the endpoint
getPath
public String getPath()
Description copied from interface:MvcEndpoint
Return the MVC path of the endpoint.- Specified by:
getPath
in interfaceMvcEndpoint
- Returns:
- the endpoint path
isSensitive
public boolean isSensitive()
Description copied from interface:MvcEndpoint
Return if the endpoint exposes sensitive information.- Specified by:
isSensitive
in interfaceMvcEndpoint
- Returns:
- if the endpoint is sensitive
getEndpointType
public Class<? extends Endpoint> getEndpointType()
Description copied from interface:MvcEndpoint
Return the type ofEndpoint
exposed, ornull
if thisMvcEndpoint
exposes information that cannot be represented as a traditionalEndpoint
.- Specified by:
getEndpointType
in interfaceMvcEndpoint
- Returns:
- the endpoint type
getDisabledResponse
protected org.springframework.http.ResponseEntity<?> getDisabledResponse()
Returns the response that should be returned when the endpoint is disabled.- Returns:
- The response to be returned when the endpoint is disabled
- Since:
- 1.2.4
- See Also:
Endpoint.isEnabled()