Class OciMetricsSupportFactory

java.lang.Object
io.helidon.integrations.oci.metrics.OciMetricsSupportFactory
Direct Known Subclasses:
OciMetricsBean

public abstract class OciMetricsSupportFactory extends Object
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 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 an OciMetricsSupport instance and then calling back to the subclass to activate that instance with, for example, routing.
      Parameters:
      rootConfig - root config node
      monitoringClient - Monitoring instance to use in preparing the OciMetricsSupport instance
    • ociMetricsSupportBuilder

      protected OciMetricsSupport.Builder ociMetricsSupportBuilder(Config rootConfig, Config ociMetricsConfig, com.oracle.bmc.monitoring.Monitoring monitoring)
      Returns the builder for constructing a new OciMetricsSupport instance, initialized using the config retrieved using the configKey() return value and the provided Monitoring instance.
      Parameters:
      rootConfig - root Config node
      ociMetricsConfig - config node for the OCI metrics settings
      monitoring - monitoring implementation to be used in preparing the OciMetricsSupport.Builder.
      Returns:
      resulting builder
    • ociMetricsConfig

      protected Config ociMetricsConfig()
      Returns the OCI metrics config node used to set up the OciMetricsSupport instance.
      Returns:
      config node controlling the OCI metrics support behavior
    • configKey

      protected abstract String 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 node
      ociMetricsConfig - OCI metrics configuration
      builder - OciMetricsSupport.Builder instance