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> Prototype.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 Prototype.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for
ObserveFeature
.-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Generated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
-
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<? extends String> sockets) Sockets the observability endpoint should be exposed on.config()
If this instance was configured, this would be the config instance used.Update builder from configuration (node of this type).cors()
Cors support inherited by each observe provider, unless explicitly configured.cors
(CrossOriginConfig cors) Cors support inherited by each observe provider, unless explicitly configured.cors
(Consumer<CrossOriginConfig.Builder> consumer) Cors support inherited by each observe provider, unless explicitly configured.cors
(Supplier<? extends CrossOriginConfig> supplier) Cors support inherited by each observe provider, unless explicitly configured.boolean
enabled()
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.observersDiscoverServices
(boolean discoverServices) Observers to use with this observe features.protected void
Handles providers and decorators.sockets()
Sockets the observability endpoint should be exposed on.Sockets the observability endpoint should be exposed on.toString()
protected void
Validates required properties.double
weight()
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, wait
Methods inherited from interface io.helidon.builder.api.Prototype.Builder
buildPrototype, self
Methods inherited from interface io.helidon.builder.api.Prototype.ConfiguredBuilder
discoverService, discoverServices
-
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
Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
config
in interfacePrototype.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
Cors support inherited by each observe provider, unless explicitly configured.- Parameters:
cors
- cors support to use- Returns:
- updated builder instance
- See Also:
-
cors
Cors support inherited by each observe provider, unless explicitly configured.- Parameters:
consumer
- consumer of builder for cors support to use- Returns:
- updated builder instance
- See Also:
-
cors
Cors 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
-false
to 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:
-
observersDiscoverServices
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:
discoverServices
- whether to discover implementations through service loader- 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
- list of observers to use in this feature- 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:
-
cors
Cors support inherited by each observe provider, unless explicitly configured.- Returns:
- the cors
-
enabled
public boolean enabled()Whether the observe support is enabled.- Returns:
- the enabled
-
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:
- the endpoint
-
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:
- the weight
-
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:
- the observers
-
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:
- the sockets
-
name
Name of this instance.- Returns:
- the name
-
config
If this instance was configured, this would be the config instance used.- Returns:
- config node used to configure this builder, or empty if not configured
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties.
-