Class AbstractEndpoint<T>
- java.lang.Object
- org.springframework.boot.actuate.endpoint.AbstractEndpoint<T>
- Type Parameters:
T
- the endpoint data type
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,Endpoint<T>
,org.springframework.context.EnvironmentAware
- Direct Known Subclasses:
AutoConfigurationReportEndpoint
,BeansEndpoint
,ConfigurationPropertiesReportEndpoint
,DumpEndpoint
,EnvironmentEndpoint
,FlywayEndpoint
,HealthEndpoint
,InfoEndpoint
,LiquibaseEndpoint
,LoggersEndpoint
,MetricsEndpoint
,RequestMappingEndpoint
,ShutdownEndpoint
,TraceEndpoint
public abstract class AbstractEndpoint<T> extends Object implements Endpoint<T>, org.springframework.context.EnvironmentAware
Abstract base forEndpoint
implementations.
Constructor Summary
Constructors Constructor Description AbstractEndpoint(String id)
Create a new sensitive endpoint instance.AbstractEndpoint(String id, boolean sensitive)
Create a new endpoint instance.AbstractEndpoint(String id, boolean sensitive, boolean enabled)
Create a new endpoint instance.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.springframework.core.env.Environment
getEnvironment()
String
getId()
The logical ID of the endpoint.boolean
isEnabled()
Return if the endpoint is enabled.boolean
isSensitive()
Return if the endpoint is sensitive, i.e.void
setEnabled(Boolean enabled)
void
setEnvironment(org.springframework.core.env.Environment environment)
void
setId(String id)
void
setSensitive(Boolean sensitive)
Constructor Detail
AbstractEndpoint
public AbstractEndpoint(String id)
Create a new sensitive endpoint instance. The endpoint will enabled flag will be based on the springEnvironment
unless explicitly set.- Parameters:
id
- the endpoint ID
AbstractEndpoint
public AbstractEndpoint(String id, boolean sensitive)
Create a new endpoint instance. The endpoint will enabled flag will be based on the springEnvironment
unless explicitly set.- Parameters:
id
- the endpoint IDsensitive
- if the endpoint is sensitive by default
AbstractEndpoint
public AbstractEndpoint(String id, boolean sensitive, boolean enabled)
Create a new endpoint instance.- Parameters:
id
- the endpoint IDsensitive
- if the endpoint is sensitiveenabled
- if the endpoint is enabled or not.
Method Detail
getEnvironment
protected final org.springframework.core.env.Environment getEnvironment()
setEnvironment
public void setEnvironment(org.springframework.core.env.Environment environment)
- Specified by:
setEnvironment
in interfaceorg.springframework.context.EnvironmentAware
getId
public String getId()
Description copied from interface:Endpoint
The logical ID of the endpoint. Must only contain simple letters, numbers and '_' characters (i.e. a "\w" regex).
isEnabled
public boolean isEnabled()
Description copied from interface:Endpoint
Return if the endpoint is enabled.
setEnabled
public void setEnabled(Boolean enabled)
isSensitive
public boolean isSensitive()
Description copied from interface:Endpoint
Return if the endpoint is sensitive, i.e. may return data that the average user should not see. Mappings can use this as a security hint.- Specified by:
isSensitive
in interfaceEndpoint<T>
- Returns:
- if the endpoint is sensitive
setSensitive
public void setSensitive(Boolean sensitive)