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
Nested ClassesModifier 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
Deprecated.static HealthObserverConfig
Create a new instance from configuration.boolean
details()
Whether details should be printed.endpoint()
exclude()
Health check names to exclude in computing the overall health of the server.Health checks with implicit types.name()
Name of this observer.boolean
Whether to use services discovered byServiceLoader
.Methods inherited from interface io.helidon.webserver.observe.ObserverConfigBase
enabled
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
Deprecated.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() -
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
-
exclude
Health check names to exclude in computing the overall health of the server.- Returns:
- health check names to exclude
-
name
String name()Description copied from interface:ObserverConfigBase
Name of this observer. Each observer should provide its own default for this property.- Specified by:
name
in interfaceObserverConfigBase
- Returns:
- observer name
-
create(io.helidon.config.Config)