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 classFluent API builder forHealthObserver.static classHealthObserverConfig.BuilderBase<BUILDER extends HealthObserverConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends HealthObserverConfig> Fluent API builder base forHealthObserver. -
Method Summary
Modifier and TypeMethodDescriptionstatic HealthObserverConfig.Builderbuilder()Create a new fluent API builder to customize configuration.static HealthObserverConfig.Builderbuilder(HealthObserverConfig instance) Create a new fluent API builder from an existing instance.config()Config provided by the user (if any).static HealthObserverConfigcreate()Create a new instance with default values.static HealthObserverConfigCreate a new instance from configuration.booleandetails()Whether details should be printed.booleanenabled()Whether this observer is enabled.endpoint()Health checks with implicit types.name()booleanWhether 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_204for success,Status.SERVICE_UNAVAILABLE_503for health down, andStatus.INTERNAL_SERVER_ERROR_500in case of error with no entity. When details are enabled, health returnsStatus.OK_200for success, same codes otherwise and a JSON entity with detailed information about each health check executed.- Returns:
- set to
trueto 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, allHealthCheckProviderbased health checks are added.- Returns:
- set to
falseto disable discovery
-
config
Config provided by the user (if any).- Returns:
- configuration
-
enabled
boolean enabled()Whether this observer is enabled.- Returns:
falseto disable observer
-