Class MonitoringAas

java.lang.Object
de.iip_ecosphere.platform.monitoring.MonitoringAas
All Implemented Interfaces:
de.iip_ecosphere.platform.support.iip_aas.AasContributor

public class MonitoringAas extends Object implements de.iip_ecosphere.platform.support.iip_aas.AasContributor
Implements a generic service that maps TraceRecord to an (application) AAS. This service is in development/preliminary. The service does not take any data or produce data, it is just meant to create up the trace record AAS entries. It can be used as a sink. Currently, the service builds up the AAS of an application. However, this functionality shall be moved that the platform is providing the AAS and the service just hooks the traces submodel into.
Author:
Holger Eichelberger, SSE
  • Field Details

  • Constructor Details

    • MonitoringAas

      public MonitoringAas()
  • Method Details

    • contributeTo

      public de.iip_ecosphere.platform.support.aas.Aas contributeTo(de.iip_ecosphere.platform.support.aas.Aas.AasBuilder aasBuilder, de.iip_ecosphere.platform.support.aas.InvocablesCreator iCreator)
      Specified by:
      contributeTo in interface de.iip_ecosphere.platform.support.iip_aas.AasContributor
    • contributeTo

      public void contributeTo(de.iip_ecosphere.platform.support.aas.ProtocolServerBuilder sBuilder)
      Specified by:
      contributeTo in interface de.iip_ecosphere.platform.support.iip_aas.AasContributor
    • isValid

      public boolean isValid()
      Specified by:
      isValid in interface de.iip_ecosphere.platform.support.iip_aas.AasContributor
    • getKind

      public de.iip_ecosphere.platform.support.iip_aas.AasContributor.Kind getKind()
      Specified by:
      getKind in interface de.iip_ecosphere.platform.support.iip_aas.AasContributor
    • handleNew

      private void handleNew(de.iip_ecosphere.platform.transport.status.Alert data)
      Handles a new alert and cleans up outdated ones.
      Parameters:
      data - the alert data
    • safe

      private static String safe(String string)
      Returns at minimum a non-empty string.
      Parameters:
      string - the input string
      Returns:
      string or empty if null
    • cleanup

      private void cleanup(de.iip_ecosphere.platform.support.aas.Aas aas)
      Cleans up outdated alerts.
      Parameters:
      aas - the AAS to clean up
    • cleanup

      private void cleanup(de.iip_ecosphere.platform.support.aas.SubmodelElementCollection alerts, long timestamp)
      Cleans up outdated alerts.
      Parameters:
      alerts - the alerts SMEC.
      timestamp - the timestamp before alerts shall be cleared