Class MonitoringReceiver.Exporter

  • Enclosing class:
    MonitoringReceiver

    protected abstract class MonitoringReceiver.Exporter
    extends java.lang.Object
    An instance holding meters for update performing the export when needed, e.g., upon request or by timer.
    Author:
    Holger Eichelberger, SSE
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String id  
      private boolean valid  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Exporter​(java.lang.String id)
      Creates an exporter.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract void addMeter​(io.micrometer.core.instrument.Meter meter)
      Adds a meter.
      protected void addMeters​(java.lang.String deviceId, javax.json.JsonObject mtrs)
      Adds a set of received meters.
      protected void dispose()
      Disposes this exporter instance.
      protected java.lang.String getId()
      Returns the source id.
      protected abstract void initialize()
      Do longer initialization here.
      protected boolean isValid()
      Returns whether the underlying object is considered valid.
      protected void validate()
      Validates this exporter, i.e., marks it indicating that the underlying resource actually exists in the system.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • id

        private java.lang.String id
      • valid

        private boolean valid
    • Constructor Detail

      • Exporter

        protected Exporter​(java.lang.String id)
        Creates an exporter. Do not longer initializations here rather than initialize().
        Parameters:
        id - the source id
    • Method Detail

      • initialize

        protected abstract void initialize()
        Do longer initialization here.
      • addMeters

        protected void addMeters​(java.lang.String deviceId,
                                 javax.json.JsonObject mtrs)
        Adds a set of received meters.
        Parameters:
        deviceId - the id of the message (deviceId)
        mtrs - the meters
      • addMeter

        protected abstract void addMeter​(io.micrometer.core.instrument.Meter meter)
        Adds a meter.
        Parameters:
        meter - the meter
      • getId

        protected java.lang.String getId()
        Returns the source id.
        Returns:
        the source id
      • isValid

        protected boolean isValid()
        Returns whether the underlying object is considered valid.
        Returns:
        true if validated through an event, false else
      • dispose

        protected void dispose()
        Disposes this exporter instance. It will be removed from the internal repository.
      • validate

        protected void validate()
        Validates this exporter, i.e., marks it indicating that the underlying resource actually exists in the system.