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 forHealthObserverConfig. -
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.static HealthObserverConfigcreate()Create a new instance with default values.static HealthObserverConfigCreate a new instance from configuration.booleandetails()Whether details should be printed.endpoint()Endpoint option.exclude()Health check names to exclude in computing the overall health of the server.Health checks with implicit types.name()Name of this observer.booleanWhether to use discovered health-check services.Methods inherited from interface ObserverConfigBase
config, enabledMethods inherited from interface Prototype.Factory
buildModifier and TypeMethodDescriptionbuild()Create a new instance of the runtime type from this config object.
-
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
-
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 discovered health-check services. By default, allHealthCheckProviderandHealthCheckservices are added. A directly created observer discovers services usingServiceLoaderand the global service registry. A registry-managed observer uses its owning registry.- Returns:
- set to
falseto disable discovery
-
exclude
-
name
String name()Description copied from interface:ObserverConfigBaseName of this observer. Each observer should provide its own default for this property.- Specified by:
namein interfaceObserverConfigBase- Returns:
- observer name
-