Class HealthObserverConfig.BuilderBase.HealthObserverConfigImpl
java.lang.Object
io.helidon.webserver.observe.ObserverConfigBase.BuilderBase.ObserverConfigBaseImpl
io.helidon.webserver.observe.health.HealthObserverConfig.BuilderBase.HealthObserverConfigImpl
- All Implemented Interfaces:
Prototype.Api
,Prototype.Factory<HealthObserver>
,HealthObserverConfig
,ObserverConfigBase
,Supplier<HealthObserver>
- Enclosing class:
HealthObserverConfig.BuilderBase<BUILDER extends HealthObserverConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends HealthObserverConfig>
protected static class HealthObserverConfig.BuilderBase.HealthObserverConfigImpl
extends ObserverConfigBase.BuilderBase.ObserverConfigBaseImpl
implements HealthObserverConfig, Supplier<HealthObserver>
Generated implementation of the prototype, can be extended by descendant prototype implementations.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.webserver.observe.health.HealthObserverConfig
HealthObserverConfig.Builder, HealthObserverConfig.BuilderBase<BUILDER extends HealthObserverConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends HealthObserverConfig> Nested classes/interfaces inherited from interface io.helidon.webserver.observe.ObserverConfigBase
ObserverConfigBase.Builder, ObserverConfigBase.BuilderBase<BUILDER extends ObserverConfigBase.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends ObserverConfigBase> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
HealthObserverConfigImpl
(HealthObserverConfig.BuilderBase<?, ?> builder) Create an instance providing a builder. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Create a new instance of the runtime type from this config object.config()
Config provided by the user (if any).boolean
details()
Whether details should be printed.endpoint()
boolean
exclude()
Health check names to exclude in computing the overall health of the server.get()
int
hashCode()
Health checks with implicit types.name()
Name of this observer.toString()
boolean
Whether to use services discovered byServiceLoader
.Methods inherited from class io.helidon.webserver.observe.ObserverConfigBase.BuilderBase.ObserverConfigBaseImpl
enabled, name
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.helidon.webserver.observe.ObserverConfigBase
enabled
-
Constructor Details
-
HealthObserverConfigImpl
Create an instance providing a builder.- Parameters:
builder
- extending builder base of this prototype
-
-
Method Details
-
build
Description copied from interface:Prototype.Factory
Create a new instance of the runtime type from this config object.- Specified by:
build
in interfacePrototype.Factory<HealthObserver>
- Returns:
- new configured runtime instance
-
get
- Specified by:
get
in interfaceSupplier<HealthObserver>
-
endpoint
- Specified by:
endpoint
in interfaceHealthObserverConfig
-
details
public boolean details()Description copied from interface:HealthObserverConfig
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.- Specified by:
details
in interfaceHealthObserverConfig
- Returns:
- set to
true
to enable details
-
healthChecks
Description copied from interface:HealthObserverConfig
Health checks with implicit types.- Specified by:
healthChecks
in interfaceHealthObserverConfig
- Returns:
- health checks to register with the observer
-
useSystemServices
public boolean useSystemServices()Description copied from interface:HealthObserverConfig
Whether to use services discovered byServiceLoader
. By default, allHealthCheckProvider
based health checks are added.- Specified by:
useSystemServices
in interfaceHealthObserverConfig
- Returns:
- set to
false
to disable discovery
-
config
Description copied from interface:HealthObserverConfig
Config provided by the user (if any).- Specified by:
config
in interfaceHealthObserverConfig
- Returns:
- configuration
-
exclude
Description copied from interface:HealthObserverConfig
Health check names to exclude in computing the overall health of the server.- Specified by:
exclude
in interfaceHealthObserverConfig
- Returns:
- health check names to exclude
-
toString
- Overrides:
toString
in classObserverConfigBase.BuilderBase.ObserverConfigBaseImpl
-
equals
- Overrides:
equals
in classObserverConfigBase.BuilderBase.ObserverConfigBaseImpl
-
hashCode
public int hashCode()- Overrides:
hashCode
in classObserverConfigBase.BuilderBase.ObserverConfigBaseImpl
-
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
-