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
ConstructorsModifierConstructorDescriptionprotectedCreates a new instance of the factory. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidactivateOciMetricsSupport(Config rootConfig, Config ociMetricsConfig, OciMetricsSupport.Builder builder) Activates OCI metrics support.protected abstract StringReturns the config key to use for retrieving OCI metrics settings from the root config.protected ConfigReturns the OCI metrics config node used to set up theOciMetricsSupportinstance.protected OciMetricsSupport.BuilderociMetricsSupportBuilder(Config rootConfig, Config ociMetricsConfig, com.oracle.bmc.monitoring.Monitoring monitoring) Returns the builder for constructing a newOciMetricsSupportinstance, initialized using the config retrieved using theconfigKey()return value and the providedMonitoringinstance.protected voidregisterOciMetrics(Config rootConfig, com.oracle.bmc.monitoring.Monitoring monitoringClient) Registers OCI metrics using the configuration and the provided monitoring client by preparing anOciMetricsSupportinstance 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 anOciMetricsSupportinstance and then calling back to the subclass to activate that instance with, for example, routing.- Parameters:
rootConfig- root config nodemonitoringClient-Monitoringinstance to use in preparing theOciMetricsSupportinstance
-
ociMetricsSupportBuilder
protected OciMetricsSupport.Builder ociMetricsSupportBuilder(Config rootConfig, Config ociMetricsConfig, com.oracle.bmc.monitoring.Monitoring monitoring) Returns the builder for constructing a newOciMetricsSupportinstance, initialized using the config retrieved using theconfigKey()return value and the providedMonitoringinstance.- Parameters:
rootConfig- rootConfignodeociMetricsConfig- 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 theOciMetricsSupportinstance.- 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.Builderinstance
-