@Endpoint(value="health", defaultSensitive=false) public class HealthEndpoint extends java.lang.Object
Exposes an Endpoint
to provide information about the health of the application.
Modifier and Type | Class and Description |
---|---|
static class |
HealthEndpoint.StatusConfiguration
Configuration related to handling of the
HealthStatus . |
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_SENSITIVE
If the endpoint is sensitive if no configuration is provided.
|
static java.lang.String |
NAME
Constant for health.
|
static java.lang.String |
PREFIX
Prefix for health endpoint.
|
Constructor and Description |
---|
HealthEndpoint(HealthAggregator<HealthResult> healthAggregator,
HealthIndicator[] healthIndicators) |
Modifier and Type | Method and Description |
---|---|
DetailsVisibility |
getDetailsVisible() |
io.reactivex.Single<HealthResult> |
getHealth(java.security.Principal principal) |
HealthEndpoint.StatusConfiguration |
getStatusConfiguration() |
protected HealthLevelOfDetail |
levelOfDetail(java.security.Principal principal)
Returns the level of detail that should be returned by the endpoint.
|
void |
setDetailsVisible(DetailsVisibility detailsVisible)
Sets the visibility policy for health information.
|
void |
setStatusConfiguration(HealthEndpoint.StatusConfiguration statusConfiguration)
Sets the status configuration.
|
public static final boolean DEFAULT_SENSITIVE
public static final java.lang.String NAME
public static final java.lang.String PREFIX
public HealthEndpoint(HealthAggregator<HealthResult> healthAggregator, HealthIndicator[] healthIndicators)
healthAggregator
- The HealthAggregator
healthIndicators
- The HealthIndicator
@Read public io.reactivex.Single<HealthResult> getHealth(@Nullable java.security.Principal principal)
principal
- Authenticated userSingle
public DetailsVisibility getDetailsVisible()
public void setDetailsVisible(DetailsVisibility detailsVisible)
detailsVisible
- The DetailsVisibility
public HealthEndpoint.StatusConfiguration getStatusConfiguration()
@Inject public void setStatusConfiguration(HealthEndpoint.StatusConfiguration statusConfiguration)
statusConfiguration
- The status configurationprotected HealthLevelOfDetail levelOfDetail(@Nullable java.security.Principal principal)
principal
- Authenticated userHealthLevelOfDetail