Module io.helidon.webserver.observe
Package io.helidon.webserver.observe
Class ObserveFeatureConfig.BuilderBase<BUILDER extends ObserveFeatureConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends ObserveFeatureConfig>
java.lang.Object
io.helidon.webserver.observe.ObserveFeatureConfig.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:
ObserveFeatureConfig.Builder
- Enclosing interface:
ObserveFeatureConfig
public abstract static class ObserveFeatureConfig.BuilderBase<BUILDER extends ObserveFeatureConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends ObserveFeatureConfig>
extends Object
implements ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for
ObserveFeatureConfig.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddObserver(Observer observer) Observers to use with this observe features.addObservers(List<? extends Observer> observers) Observers to use with this observe features.addSockets(List<String> sockets) Sockets the observability endpoint should be exposed on.Clear all observers.Clear all sockets.config()Configuration of the observe feature, if present.Deprecated.Update builder from configuration (node of this type).cors()Deprecated, for removal: This API element is subject to removal in a future version.feature specific CORS configuration is deprecated and will be removed; use either config based CORS setup (configuration keycors, or programmatic setup using theio.helidon.webserver.cors.CorsFeatureserver featurecors(CrossOriginConfig cors) Deprecated, for removal: This API element is subject to removal in a future version.feature specific CORS configuration is deprecated and will be removed; use either config based CORS setup (configuration keycors, or programmatic setup using theio.helidon.webserver.cors.CorsFeatureserver featurecors(Consumer<CrossOriginConfig.Builder> consumer) Deprecated, for removal: This API element is subject to removal in a future version.feature specific CORS configuration is deprecated and will be removed; use either config based CORS setup (configuration keycors, or programmatic setup using theio.helidon.webserver.cors.CorsFeatureserver featurecors(Supplier<? extends CrossOriginConfig> supplier) Deprecated, for removal: This API element is subject to removal in a future version.feature specific CORS configuration is deprecated and will be removed; use either config based CORS setup (configuration keycors, or programmatic setup using theio.helidon.webserver.cors.CorsFeatureserver featurebooleanenabled()Whether the observe support is enabled.enabled(boolean enabled) Whether the observe support is enabled.endpoint()Root endpoint to use for observe providers.Root endpoint to use for observe providers.from(ObserveFeatureConfig prototype) Update this builder from an existing prototype instance.from(ObserveFeatureConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.name()Name of this instance.Name of this instance.Observers to use with this observe features.Observers to use with this observe features.booleanService discovery flag forobservers().observersDiscoverServices(boolean observersDiscoverServices) Service discovery flag forobservers().protected voidHandles providers and decorators.sockets()Sockets the observability endpoint should be exposed on.Sockets the observability endpoint should be exposed on.toString()protected voidValidates required properties.doubleweight()Change the weight of this feature.weight(double weight) Change the weight of this feature.Methods 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
-
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 ObserveFeatureConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ObserveFeatureConfig> - 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 ObserveFeatureConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ObserveFeatureConfig> - Parameters:
config- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
cors
Deprecated, for removal: This API element is subject to removal in a future version.feature specific CORS configuration is deprecated and will be removed; use either config based CORS setup (configuration keycors, or programmatic setup using theio.helidon.webserver.cors.CorsFeatureserver featureCors support inherited by each observe provider, unless explicitly configured.- Parameters:
cors- cors support to use- Returns:
- updated builder instance
- See Also:
-
cors
@Deprecated(since="4.4.0", forRemoval=true) public BUILDER cors(Consumer<CrossOriginConfig.Builder> consumer) Deprecated, for removal: This API element is subject to removal in a future version.feature specific CORS configuration is deprecated and will be removed; use either config based CORS setup (configuration keycors, or programmatic setup using theio.helidon.webserver.cors.CorsFeatureserver featureCors support inherited by each observe provider, unless explicitly configured.- Parameters:
consumer- consumer of builder of cors support to use- Returns:
- updated builder instance
- See Also:
-
cors
@Deprecated(since="4.4.0", forRemoval=true) public BUILDER cors(Supplier<? extends CrossOriginConfig> supplier) Deprecated, for removal: This API element is subject to removal in a future version.feature specific CORS configuration is deprecated and will be removed; use either config based CORS setup (configuration keycors, or programmatic setup using theio.helidon.webserver.cors.CorsFeatureserver featureCors support inherited by each observe provider, unless explicitly configured.- Parameters:
supplier- supplier of cors support to use- Returns:
- updated builder instance
- See Also:
-
enabled
Whether the observe support is enabled.- Parameters:
enabled-falseto disable observe feature- Returns:
- updated builder instance
- See Also:
-
endpoint
Root endpoint to use for observe providers. By default, all observe endpoint are under this root endpoint.Example:
If root endpoint is/observe(the default), and default health endpoint ishealth(relative), health endpoint would be/observe/health.- Parameters:
endpoint- endpoint to use- Returns:
- updated builder instance
- See Also:
-
weight
Change the weight of this feature. This may change the order of registration of this feature. By default, observability weight is 80.0 so it is registered after routing.- Parameters:
weight- weight to use- Returns:
- updated builder instance
- See Also:
-
clearObservers
Clear all observers.- Returns:
- updated builder instance
- See Also:
-
observers
Observers to use with this observe features. Each observer type is registered only once, unless it uses a custom name (default name is the same as the type).- Parameters:
observers- list of observers to use in this feature- Returns:
- updated builder instance
- See Also:
-
addObservers
Observers to use with this observe features. Each observer type is registered only once, unless it uses a custom name (default name is the same as the type).- Parameters:
observers- list of observers to use in this feature- Returns:
- updated builder instance
- See Also:
-
addObserver
Observers to use with this observe features. Each observer type is registered only once, unless it uses a custom name (default name is the same as the type).- Parameters:
observer- add single list of observers to use in this feature- Returns:
- updated builder instance
- See Also:
-
clearSockets
Clear all sockets.- Returns:
- updated builder instance
- See Also:
-
sockets
Sockets the observability endpoint should be exposed on. If not defined, defaults to the default socket ("@default". Each observer may have its own configuration of sockets that are relevant to it, this only controls the endpoints!- Parameters:
sockets- list of sockets to register observe endpoint on- Returns:
- updated builder instance
- See Also:
-
addSockets
Sockets the observability endpoint should be exposed on. If not defined, defaults to the default socket ("@default". Each observer may have its own configuration of sockets that are relevant to it, this only controls the endpoints!- Parameters:
sockets- list of sockets to register observe endpoint on- Returns:
- updated builder instance
- See Also:
-
name
Name of this instance.- Parameters:
name- instance name- Returns:
- updated builder instance
- See Also:
-
observersDiscoverServices
Service discovery flag forobservers(). If set totrue, services will be discovered from Java service loader, or Helidon ServiceRegistry.- Parameters:
observersDiscoverServices- whether to enable automatic service discovery- Returns:
- updated builder instance
- See Also:
-
cors
Deprecated, for removal: This API element is subject to removal in a future version.feature specific CORS configuration is deprecated and will be removed; use either config based CORS setup (configuration keycors, or programmatic setup using theio.helidon.webserver.cors.CorsFeatureserver featureCors support inherited by each observe provider, unless explicitly configured.- Returns:
- cors support to use
-
enabled
public boolean enabled()Whether the observe support is enabled.- Returns:
falseto disable observe feature
-
endpoint
Root endpoint to use for observe providers. By default, all observe endpoint are under this root endpoint.Example:
If root endpoint is/observe(the default), and default health endpoint ishealth(relative), health endpoint would be/observe/health.- Returns:
- endpoint to use
-
weight
public double weight()Change the weight of this feature. This may change the order of registration of this feature. By default, observability weight is 80.0 so it is registered after routing.- Returns:
- weight to use
-
observers
Observers to use with this observe features. Each observer type is registered only once, unless it uses a custom name (default name is the same as the type).- Returns:
- list of observers to use in this feature
-
config
Configuration of the observe feature, if present.- Returns:
- config node of the feature
-
sockets
Sockets the observability endpoint should be exposed on. If not defined, defaults to the default socket ("@default". Each observer may have its own configuration of sockets that are relevant to it, this only controls the endpoints!- Returns:
- list of sockets to register observe endpoint on
-
name
Name of this instance.- Returns:
- instance name
-
observersDiscoverServices
public boolean observersDiscoverServices()Service discovery flag forobservers(). If set totrue, services will be discovered from Java service loader, or Helidon ServiceRegistry.- Returns:
- whether to enable automatic service discovery
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties.
-
config(io.helidon.config.Config)