@Endpoint(value="health", defaultSensitive=false) public class HealthEndpoint extends 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 String |
NAME
Constant for health.
|
static 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(Principal principal) |
HealthEndpoint.StatusConfiguration |
getStatusConfiguration() |
protected HealthLevelOfDetail |
levelOfDetail(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 String NAME
public static final String PREFIX
public HealthEndpoint(HealthAggregator<HealthResult> healthAggregator, HealthIndicator[] healthIndicators)
healthAggregator
- The HealthAggregator
healthIndicators
- The HealthIndicator
@Read public io.reactivex.Single<HealthResult> getHealth(@Nullable 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 Principal principal)
principal
- Authenticated userHealthLevelOfDetail