Class MetricsExample

  • All Implemented Interfaces:
    Runnable

    @Singleton
    public class MetricsExample
    extends Object
    implements Runnable
    Example illustrating usage of metrics API, and demo.

    This can be run either via a simple (standalone) main(), see MetricsExampleMain and MetricsPrometheusExampleMain, or in Karaf under OSGi by "feature:install odl-infrautils-metrics-sample" (in which case you will need to feature:install an implementation of MetricProvider, first).

    Author:
    Michael Vorburger.ch
    • Constructor Detail

      • MetricsExample

        @Inject
        public MetricsExample​(MetricProvider metricProvider)
    • Method Detail

      • init

        @PostConstruct
        public void init()
      • close

        @PreDestroy
        public void close()
      • run

        public void run()
        Specified by:
        run in interface Runnable