Class OciMetricsSupportFactory
java.lang.Object
io.helidon.integrations.oci.metrics.OciMetricsSupportFactory
- Direct Known Subclasses:
OciMetricsBean
Holds information needed to create an instance of
OciMetricsSupport
.
This class is intended as an abstract superclass for CDI beans responsible for initializing an
OciMetricsSupport
instance using config and the Monitoring
instance.
Concrete implementations implement must, of course, implement the abstract methods and might override other methods
as needed.
Callers typically invoke registerOciMetrics(io.helidon.config.Config, com.oracle.bmc.monitoring.Monitoring)
directly.
-
Constructor Summary
ModifierConstructorDescriptionprotected
Creates a new instance of the factory. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
activateOciMetricsSupport
(Config rootConfig, Config ociMetricsConfig, OciMetricsSupport.Builder builder) Activates OCI metrics support.protected abstract String
Returns the config key to use for retrieving OCI metrics settings from the root config.protected Config
Returns the OCI metrics config node used to set up theOciMetricsSupport
instance.protected OciMetricsSupport.Builder
ociMetricsSupportBuilder
(Config rootConfig, Config ociMetricsConfig, com.oracle.bmc.monitoring.Monitoring monitoring) Returns the builder for constructing a newOciMetricsSupport
instance, initialized using the config retrieved using theconfigKey()
return value and the providedMonitoring
instance.protected void
registerOciMetrics
(Config rootConfig, com.oracle.bmc.monitoring.Monitoring monitoringClient) Registers OCI metrics using the configuration and the provided monitoring client by preparing anOciMetricsSupport
instance and then calling back to the subclass to activate that instance with, for example, routing.
-
Constructor Details
-
OciMetricsSupportFactory
protected OciMetricsSupportFactory()Creates a new instance of the factory.
-
-
Method Details
-
registerOciMetrics
protected void registerOciMetrics(Config rootConfig, com.oracle.bmc.monitoring.Monitoring monitoringClient) Registers OCI metrics using the configuration and the provided monitoring client by preparing anOciMetricsSupport
instance and then calling back to the subclass to activate that instance with, for example, routing.- Parameters:
rootConfig
- root config nodemonitoringClient
-Monitoring
instance to use in preparing theOciMetricsSupport
instance
-
ociMetricsSupportBuilder
protected OciMetricsSupport.Builder ociMetricsSupportBuilder(Config rootConfig, Config ociMetricsConfig, com.oracle.bmc.monitoring.Monitoring monitoring) Returns the builder for constructing a newOciMetricsSupport
instance, initialized using the config retrieved using theconfigKey()
return value and the providedMonitoring
instance.- Parameters:
rootConfig
- rootConfig
nodeociMetricsConfig
- config node for the OCI metrics settingsmonitoring
- monitoring implementation to be used in preparing theOciMetricsSupport.Builder
.- Returns:
- resulting builder
-
ociMetricsConfig
Returns the OCI metrics config node used to set up theOciMetricsSupport
instance.- Returns:
- config node controlling the OCI metrics support behavior
-
configKey
Returns the config key to use for retrieving OCI metrics settings from the root config.- Returns:
- config key for OCI metrics settings
-
activateOciMetricsSupport
protected abstract void activateOciMetricsSupport(Config rootConfig, Config ociMetricsConfig, OciMetricsSupport.Builder builder) Activates OCI metrics support.- Parameters:
rootConfig
- root config nodeociMetricsConfig
- OCI metrics configurationbuilder
-OciMetricsSupport.Builder
instance
-