Class MetricsObserverConfig.BuilderBase<BUILDER extends MetricsObserverConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends MetricsObserverConfig>
java.lang.Object
io.helidon.webserver.observe.ObserverConfigBase.BuilderBase<BUILDER,PROTOTYPE>
io.helidon.webserver.observe.metrics.MetricsObserverConfig.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:
MetricsObserverConfig.Builder
- Enclosing interface:
MetricsObserverConfig
public abstract static class MetricsObserverConfig.BuilderBase<BUILDER extends MetricsObserverConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends MetricsObserverConfig>
extends ObserverConfigBase.BuilderBase<BUILDER,PROTOTYPE>
implements Prototype.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for
MetricsObserver
.-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Generated 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
-
Method Summary
Modifier and TypeMethodDescriptionClear existing value of this property.config()
If this instance was configured, this would be the config instance used.Update builder from configuration (node of this type).endpoint()
from
(MetricsObserverConfig prototype) Update this builder from an existing prototype instance.from
(MetricsObserverConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.If you want to have multiple meter registries with different endpoints, you may create them usingMeterRegistry meterRegistry = MetricsFactory.getInstance() .createMeterRegistry(metricsConfig); MetricsFeature.builder() .meterRegistry(meterRegistry) // further settings on the feature builder, etc.
metricsConfig
in each case has differentsettings
.meterRegistry
(MeterRegistry meterRegistry) If you want to have multiple meter registries with different endpoints, you may create them usingMeterRegistry meterRegistry = MetricsFactory.getInstance() .createMeterRegistry(metricsConfig); MetricsFeature.builder() .meterRegistry(meterRegistry) // further settings on the feature builder, etc.
metricsConfig
in each case has differentsettings
.AssignsMetricsSettings
which will be used in creating theMetricsSupport
instance at build-time.metricsConfig
(MetricsConfig metricsConfig) AssignsMetricsSettings
which will be used in creating theMetricsSupport
instance at build-time.metricsConfig
(Consumer<MetricsConfig.Builder> consumer) AssignsMetricsSettings
which will be used in creating theMetricsSupport
instance at build-time.metricsConfig
(Supplier<? extends MetricsConfig> supplier) AssignsMetricsSettings
which will be used in creating theMetricsSupport
instance at build-time.protected void
Handles providers and decorators.toString()
protected void
Validates required properties.Methods inherited from class io.helidon.webserver.observe.ObserverConfigBase.BuilderBase
enabled, enabled, from, from, name, name
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 MetricsObserverConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends MetricsObserverConfig> - Overrides:
config
in classObserverConfigBase.BuilderBase<BUILDER extends MetricsObserverConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends MetricsObserverConfig> - Parameters:
config
- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
endpoint
- Parameters:
endpoint
-- Returns:
- updated builder instance
- See Also:
-
metricsConfig
AssignsMetricsSettings
which will be used in creating theMetricsSupport
instance at build-time.- Parameters:
metricsConfig
- the metrics settings to assign for use in building theMetricsSupport
instance- Returns:
- updated builder instance
- See Also:
-
metricsConfig
AssignsMetricsSettings
which will be used in creating theMetricsSupport
instance at build-time.- Parameters:
consumer
- consumer of builder for the metrics settings to assign for use in building theMetricsSupport
instance- Returns:
- updated builder instance
- See Also:
-
metricsConfig
AssignsMetricsSettings
which will be used in creating theMetricsSupport
instance at build-time.- Parameters:
supplier
- supplier of the metrics settings to assign for use in building theMetricsSupport
instance- Returns:
- updated builder instance
- See Also:
-
clearMeterRegistry
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
meterRegistry
If you want to have multiple meter registries with different endpoints, you may create them usingMeterRegistry meterRegistry = MetricsFactory.getInstance() .createMeterRegistry(metricsConfig); MetricsFeature.builder() .meterRegistry(meterRegistry) // further settings on the feature builder, etc.
metricsConfig
in each case has differentsettings
.If this method is not called,
MetricsFeature
would use the shared instance as provided byMetricsFactory.globalRegistry()
.- Parameters:
meterRegistry
- meterRegistry to use in this metric support- Returns:
- updated builder instance
- See Also:
-
endpoint
- Returns:
- the endpoint
-
metricsConfig
AssignsMetricsSettings
which will be used in creating theMetricsSupport
instance at build-time.- Returns:
- the metrics config
-
meterRegistry
If you want to have multiple meter registries with different endpoints, you may create them usingMeterRegistry meterRegistry = MetricsFactory.getInstance() .createMeterRegistry(metricsConfig); MetricsFeature.builder() .meterRegistry(meterRegistry) // further settings on the feature builder, etc.
metricsConfig
in each case has differentsettings
.If this method is not called,
MetricsFeature
would use the shared instance as provided byMetricsFactory.globalRegistry()
.- Returns:
- the meter registry
-
config
If this instance was configured, this would be the config instance used.- Overrides:
config
in classObserverConfigBase.BuilderBase<BUILDER extends MetricsObserverConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends MetricsObserverConfig> - Returns:
- config node used to configure this builder, or empty if not configured
-
toString
- Overrides:
toString
in classObserverConfigBase.BuilderBase<BUILDER extends MetricsObserverConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends MetricsObserverConfig>
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators.- Overrides:
preBuildPrototype
in classObserverConfigBase.BuilderBase<BUILDER extends MetricsObserverConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends MetricsObserverConfig>
-
validatePrototype
protected void validatePrototype()Validates required properties.- Overrides:
validatePrototype
in classObserverConfigBase.BuilderBase<BUILDER extends MetricsObserverConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends MetricsObserverConfig>
-