Class MonitoringReceiver


  • public abstract class MonitoringReceiver
    extends java.lang.Object
    Observes IIP-Ecosphere standard transport channels and prepares the information for feeding it into the monitoring system. This class assumes that Transport is set up.
    Author:
    Holger Eichelberger, SSE
    • Constructor Detail

      • MonitoringReceiver

        public MonitoringReceiver()
    • Method Detail

      • obtainExporter

        protected MonitoringReceiver.Exporter obtainExporter​(java.lang.String id)
        Obtains an exporter for the given source id. Creates and registers a new one if required.
        Parameters:
        id - the object id
        Returns:
        the exporter
      • createExporter

        protected abstract MonitoringReceiver.Exporter createExporter​(java.lang.String id)
        Creates an exporter instance.
        Parameters:
        id - the id of origin
        Returns:
        the exporter instance
      • notifyMeterReception

        protected void notifyMeterReception​(java.lang.String stream,
                                            java.lang.String id,
                                            javax.json.JsonObject obj)
        Is called when a meter information was received via transport. [testing, debugging]
        Parameters:
        stream - the transport stream/channel
        id - the id
        obj - the received object
      • notifyStatusReceived

        protected void notifyStatusReceived​(de.iip_ecosphere.platform.transport.status.StatusMessage msg)
        Is called when a status information was received via transport. [testing, debugging]
        Parameters:
        msg - the status message
      • notifyMeterAdded

        protected void notifyMeterAdded​(io.micrometer.core.instrument.Meter meter)
        Is called when a meter was added. [testing, debugging]
        Parameters:
        meter - the meter
      • notifyExporterAdded

        protected void notifyExporterAdded​(MonitoringReceiver.Exporter exporter)
        Notifies about a added exporter.
        Parameters:
        exporter - the exporter
      • notifyExporterRemoved

        protected void notifyExporterRemoved​(MonitoringReceiver.Exporter exporter)
        Notifies about a removed exporter.
        Parameters:
        exporter - the exporter
      • start

        public void start()
        Starts the exporter.
      • stop

        public void stop()
        Stops the exporter.