java.lang.Object
io.helidon.servicecommon.rest.HelidonRestServiceSupport.Builder<MetricsSupport.Builder,MetricsSupport>
io.helidon.metrics.MetricsSupport.Builder
- All Implemented Interfaces:
Builder<MetricsSupport.Builder,
,MetricsSupport> MetricsSupport.Builder<MetricsSupport.Builder,
,MetricsSupport> Supplier<MetricsSupport>
- Enclosing class:
- MetricsSupport
public static class MetricsSupport.Builder
extends HelidonRestServiceSupport.Builder<MetricsSupport.Builder,MetricsSupport>
implements MetricsSupport.Builder<MetricsSupport.Builder,MetricsSupport>
A fluent API builder to build instances of
MetricsSupport
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Returns the newMetricsSupport
instance according to the builder's settings.protected MetricsSupport
build
(Function<MetricsSupport.Builder, MetricsSupport> factory) Creates a newMetricsSupport
instance from the provided factory.Deprecated, for removal: This API element is subject to removal in a future version.keyPerformanceIndicatorsMetricsConfig
(Config kpiConfig) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.metricsSettings
(MetricsSettings.Builder metricsSettingsBuilder) AssignsMetricsSettings
which will be used in creating theMetricsSupport
instance at build-time.registryFactory
(RegistryFactory factory) If you want to have multiple registry factories with different endpoints, you may create them usingRegistryFactory.create(MetricsSettings)
orRegistryFactory.create()
and create multipleMetricsSupport
instances with differentHelidonRestServiceSupport.Builder.webContext(String)
contexts}.protected Config
webContextConfig
(Config config) Returns the web-contextConfig
node from the provided config.Methods inherited from class io.helidon.servicecommon.rest.HelidonRestServiceSupport.Builder
config, crossOriginConfig, crossOriginConfig, restServiceSettings, webContext
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.helidon.metrics.serviceapi.MetricsSupport.Builder
restServiceSettings
-
Constructor Details
-
Builder
protected Builder()Creates a new builder instance.
-
-
Method Details
-
webContextConfig
Description copied from class:HelidonRestServiceSupport.Builder
Returns the web-contextConfig
node from the provided config.- Overrides:
webContextConfig
in classHelidonRestServiceSupport.Builder<MetricsSupport.Builder,
MetricsSupport> - Parameters:
config
- config to query for web-context- Returns:
Config
node for web-context
-
build
Description copied from interface:MetricsSupport.Builder
Returns the newMetricsSupport
instance according to the builder's settings.- Specified by:
build
in interfaceBuilder<MetricsSupport.Builder,
MetricsSupport> - Specified by:
build
in interfaceMetricsSupport.Builder<MetricsSupport.Builder,
MetricsSupport> - Returns:
- the new metrics support
-
build
Creates a newMetricsSupport
instance from the provided factory.- Parameters:
factory
- the factory which maps the builder to aMetricsSupport
instance- Returns:
- the created
MetricsSupport
instance
-
config
Deprecated, for removal: This API element is subject to removal in a future version.UsemetricsSettings(MetricsSettings.Builder)
insteadOverride default configuration.- Overrides:
config
in classHelidonRestServiceSupport.Builder<MetricsSupport.Builder,
MetricsSupport> - Parameters:
config
- configuration instance- Returns:
- updated builder instance
- See Also:
-
metricsSettings
Description copied from interface:MetricsSupport.Builder
AssignsMetricsSettings
which will be used in creating theMetricsSupport
instance at build-time.- Specified by:
metricsSettings
in interfaceMetricsSupport.Builder<MetricsSupport.Builder,
MetricsSupport> - Parameters:
metricsSettingsBuilder
- the metrics settings to assign for use in building theMetricsSupport
instance- Returns:
- updated builder
-
registryFactory
If you want to have multiple registry factories with different endpoints, you may create them usingRegistryFactory.create(MetricsSettings)
orRegistryFactory.create()
and create multipleMetricsSupport
instances with differentHelidonRestServiceSupport.Builder.webContext(String)
contexts}.If this method is not called,
MetricsSupport
would use the shared instance as provided byRegistryFactory.getInstance(io.helidon.config.Config)
- Parameters:
factory
- factory to use in this metric support- Returns:
- updated builder instance
-
keyPerformanceIndicatorsMetricsSettings
@Deprecated(since="2.4.0", forRemoval=true) public MetricsSupport.Builder keyPerformanceIndicatorsMetricsSettings(KeyPerformanceIndicatorMetricsSettings.Builder builder) Deprecated, for removal: This API element is subject to removal in a future version.Sets the builder for KPI metrics settings, overriding any previously-assigned settings.- Parameters:
builder
- for the KPI metrics settings- Returns:
- updated builder instance
-
keyPerformanceIndicatorsMetricsConfig
@Deprecated(since="2.4.0", forRemoval=true) public MetricsSupport.Builder keyPerformanceIndicatorsMetricsConfig(Config kpiConfig) Deprecated, for removal: This API element is subject to removal in a future version.Updates the KPI metrics config using the extended KPI metrics config node provided.- Parameters:
kpiConfig
- Config node containing extended KPI metrics config- Returns:
- updated builder instance
-
metricsSettings(MetricsSettings.Builder)
instead