Class HealthObserverConfig.BuilderBase<BUILDER extends HealthObserverConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends HealthObserverConfig>
java.lang.Object
io.helidon.webserver.observe.ObserverConfigBase.BuilderBase<BUILDER,PROTOTYPE>
io.helidon.webserver.observe.health.HealthObserverConfig.BuilderBase<BUILDER,PROTOTYPE>
- Type Parameters:
BUILDER- type of the builder extending this abstract builderPROTOTYPE- type of the prototype interface that would be built byPrototype.Builder.buildPrototype()
- All Implemented Interfaces:
Prototype.Builder<BUILDER,,PROTOTYPE> ConfigBuilderSupport.ConfiguredBuilder<BUILDER,,PROTOTYPE> ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
- Direct Known Subclasses:
HealthObserverConfig.Builder
- Enclosing interface:
HealthObserverConfig
public abstract static class HealthObserverConfig.BuilderBase<BUILDER extends HealthObserverConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends HealthObserverConfig>
extends ObserverConfigBase.BuilderBase<BUILDER,PROTOTYPE>
implements ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for
HealthObserverConfig.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations.Nested classes/interfaces inherited from class io.helidon.webserver.observe.ObserverConfigBase.BuilderBase
ObserverConfigBase.BuilderBase.ObserverConfigBaseImpl -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddCheck(HealthCheck check) Health checks with implicit types.addCheck(HealthCheck check, HealthCheckType type) Add the provided health check using an explicit type (may differ from theHealthCheck.type().addCheck(Supplier<HealthCheckResponse> responseSupplier, HealthCheckType type, String name) Add a health check using the provided response supplier, type, and name.addChecks(HealthCheck[] checks) Add the provided health checks.addExclude(List<String> exclude) Health check names to exclude in computing the overall health of the server.addExcluded(String excluded) Health check names to exclude in computing the overall health of the server.addHealthChecks(List<? extends HealthCheck> healthChecks) Health checks with implicit types.Clear all exclude.Clear all healthChecks.Deprecated.Update builder from configuration (node of this type).booleandetails()Whether details should be printed.details(boolean details) Whether details should be printed.endpoint()Endpoint option.Endpoint option.exclude()Health check names to exclude in computing the overall health of the server.Health check names to exclude in computing the overall health of the server.from(HealthObserverConfig prototype) Update this builder from an existing prototype instance.from(HealthObserverConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.Health checks with implicit types.healthChecks(List<? extends HealthCheck> healthChecks) Health checks with implicit types.protected voidHandles providers and decorators.toString()booleanWhether to use services discovered byServiceLoader.useSystemServices(boolean useSystemServices) Whether to use services discovered byServiceLoader.protected voidValidates required properties.Methods inherited from class io.helidon.webserver.observe.ObserverConfigBase.BuilderBase
config, enabled, enabled, from, from, name, nameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.helidon.builder.api.Prototype.Builder
buildPrototype, self
-
Constructor Details
-
BuilderBase
protected BuilderBase()Protected to support extensibility.
-
-
Method Details
-
from
Update this builder from an existing prototype instance. This method disables automatic service discovery.- Parameters:
prototype- existing prototype to update this builder from- Returns:
- updated builder instance
-
from
Update this builder from an existing prototype builder instance.- Parameters:
builder- existing builder prototype to update this builder from- Returns:
- updated builder instance
-
addCheck
Add the provided health check using an explicit type (may differ from theHealthCheck.type().- Parameters:
check- health check to addtype- type to use- Returns:
- updated builder instance
-
addCheck
public BUILDER addCheck(Supplier<HealthCheckResponse> responseSupplier, HealthCheckType type, String name) Add a health check using the provided response supplier, type, and name.- Parameters:
responseSupplier- supplier of the health check responsetype- type to usename- name to use for the health check- Returns:
- updated builder instance
-
addChecks
Add the provided health checks.- Parameters:
checks- health checks to add- Returns:
- updated builder instance
-
config
Deprecated.Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
configin interfaceConfigBuilderSupport.ConfiguredBuilder<BUILDER extends HealthObserverConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends HealthObserverConfig> - Overrides:
configin classObserverConfigBase.BuilderBase<BUILDER extends HealthObserverConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends HealthObserverConfig> - Parameters:
config- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
config
Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
configin interfaceConfigBuilderSupport.ConfiguredBuilder<BUILDER extends HealthObserverConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends HealthObserverConfig> - Overrides:
configin classObserverConfigBase.BuilderBase<BUILDER extends HealthObserverConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends HealthObserverConfig> - Parameters:
config- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
endpoint
Endpoint option.- Parameters:
endpoint- the endpoint option- Returns:
- updated builder instance
- See Also:
-
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.- Parameters:
details- set totrueto enable details- Returns:
- updated builder instance
- See Also:
-
clearHealthChecks
Clear all healthChecks.- Returns:
- updated builder instance
- See Also:
-
healthChecks
Health checks with implicit types.- Parameters:
healthChecks- health checks to register with the observer- Returns:
- updated builder instance
- See Also:
-
addHealthChecks
Health checks with implicit types.- Parameters:
healthChecks- health checks to register with the observer- Returns:
- updated builder instance
- See Also:
-
addCheck
Health checks with implicit types.- Parameters:
check- add single health checks to register with the observer- Returns:
- updated builder instance
- See Also:
-
useSystemServices
Whether to use services discovered byServiceLoader. By default, allHealthCheckProviderbased health checks are added.- Parameters:
useSystemServices- set tofalseto disable discovery- Returns:
- updated builder instance
- See Also:
-
clearExclude
Clear all exclude.- Returns:
- updated builder instance
- See Also:
-
exclude
Health check names to exclude in computing the overall health of the server.- Parameters:
exclude- health check names to exclude- Returns:
- updated builder instance
- See Also:
-
addExclude
Health check names to exclude in computing the overall health of the server.- Parameters:
exclude- health check names to exclude- Returns:
- updated builder instance
- See Also:
-
addExcluded
Health check names to exclude in computing the overall health of the server.- Parameters:
excluded- add single health check names to exclude- Returns:
- updated builder instance
- See Also:
-
endpoint
Endpoint option.- Returns:
- the endpoint option
-
details
public 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
Health checks with implicit types.- Returns:
- health checks to register with the observer
-
useSystemServices
public boolean useSystemServices()Whether to use services discovered byServiceLoader. By default, allHealthCheckProviderbased health checks are added.- Returns:
- set to
falseto disable discovery
-
exclude
Health check names to exclude in computing the overall health of the server.- Returns:
- health check names to exclude
-
toString
- Overrides:
toStringin classObserverConfigBase.BuilderBase<BUILDER extends HealthObserverConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends HealthObserverConfig>
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators.- Overrides:
preBuildPrototypein classObserverConfigBase.BuilderBase<BUILDER extends HealthObserverConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends HealthObserverConfig>
-
validatePrototype
protected void validatePrototype()Validates required properties.- Overrides:
validatePrototypein classObserverConfigBase.BuilderBase<BUILDER extends HealthObserverConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends HealthObserverConfig>
-
config(io.helidon.config.Config)