Class MonitoringReceiver
java.lang.Object
de.iip_ecosphere.platform.monitoring.MonitoringReceiver
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classAn instance holding meters for update performing the export when needed, e.g., upon request or by timer.private classA meter reception callback for receiving meter information from services or ECS runtime.private classReceives status messages such as starting/stopping devices, containers, services. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract MonitoringReceiver.ExportercreateExporter(String id) Creates an exporter instance.Returns the exporters.protected voidNotifies about a added exporter.protected voidNotifies about a removed exporter.protected voidnotifyMeterAdded(de.iip_ecosphere.platform.support.metrics.Meter meter) Is called when a meter was added.protected voidnotifyMeterReception(String stream, String id, de.iip_ecosphere.platform.support.json.JsonObject obj) Is called when a meter information was received via transport.protected voidnotifyStatusReceived(de.iip_ecosphere.platform.transport.status.StatusMessage msg) Is called when a status information was received via transport.protected MonitoringReceiver.ExporterobtainExporter(String id) Obtains an exporter for the given source id.voidstart()Starts the exporter.voidstop()Stops the exporter.
-
Field Details
-
registry
-
-
Constructor Details
-
MonitoringReceiver
public MonitoringReceiver()
-
-
Method Details
-
obtainExporter
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
Creates an exporter instance.- Parameters:
id- the id of origin- Returns:
- the exporter instance
-
notifyMeterReception
protected void notifyMeterReception(String stream, String id, de.iip_ecosphere.platform.support.json.JsonObject obj) Is called when a meter information was received via transport. [testing, debugging]- Parameters:
stream- the transport stream/channelid- the idobj- 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(de.iip_ecosphere.platform.support.metrics.Meter meter) Is called when a meter was added. [testing, debugging]- Parameters:
meter- the meter
-
notifyExporterAdded
Notifies about a added exporter.- Parameters:
exporter- the exporter
-
notifyExporterRemoved
Notifies about a removed exporter.- Parameters:
exporter- the exporter
-
start
public void start()Starts the exporter. -
stop
public void stop()Stops the exporter. -
exporters
Returns the exporters.- Returns:
- the exporters
-