Interface HealthObserverConfig
- All Superinterfaces:
ObserverConfigBase
,Prototype.Api
,Prototype.Factory<HealthObserver>
- All Known Implementing Classes:
HealthObserverConfig.BuilderBase.HealthObserverConfigImpl
Configuration of Health observer.
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Fluent API builder forHealthObserver
.static class
HealthObserverConfig.BuilderBase<BUILDER extends HealthObserverConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends HealthObserverConfig> Fluent API builder base forHealthObserver
. -
Method Summary
Modifier and TypeMethodDescriptionstatic HealthObserverConfig.Builder
builder()
Create a new fluent API builder to customize configuration.static HealthObserverConfig.Builder
builder
(HealthObserverConfig instance) Create a new fluent API builder from an existing instance.config()
Config provided by the user (if any).static HealthObserverConfig
create()
Create a new instance with default values.static HealthObserverConfig
Create a new instance from configuration.boolean
details()
Whether details should be printed.boolean
enabled()
Whether this observer is enabled.endpoint()
Health checks with implicit types.name()
boolean
Whether to use services discovered byServiceLoader
.Methods inherited from interface io.helidon.builder.api.Prototype.Factory
build
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- Parameters:
instance
- an existing instance used as a base for the builder- Returns:
- a builder based on an instance
-
create
Create a new instance from configuration.- Parameters:
config
- used to configure the new instance- Returns:
- a new instance configured from configuration
-
create
Create a new instance with default values.- Returns:
- a new instance
-
endpoint
String endpoint() -
name
String name() -
details
boolean details()Whether details should be printed. By default, health only returns aStatus.NO_CONTENT_204
for success,Status.SERVICE_UNAVAILABLE_503
for health down, andStatus.INTERNAL_SERVER_ERROR_500
in case of error with no entity. When details are enabled, health returnsStatus.OK_200
for success, same codes otherwise and a JSON entity with detailed information about each health check executed.- Returns:
- set to
true
to enable details
-
healthChecks
List<HealthCheck> healthChecks()Health checks with implicit types.- Returns:
- health checks to register with the observer
-
useSystemServices
boolean useSystemServices()Whether to use services discovered byServiceLoader
. By default, allHealthCheckProvider
based health checks are added.- Returns:
- set to
false
to disable discovery
-
config
Config provided by the user (if any).- Returns:
- configuration
-
enabled
boolean enabled()Whether this observer is enabled.- Returns:
false
to disable observer
-