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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classA trace reception callback callingTraceToAasin own threads.Nested classes/interfaces inherited from interface de.iip_ecosphere.platform.support.iip_aas.AasContributor
de.iip_ecosphere.platform.support.iip_aas.AasContributor.Kind -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate longprivate longstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprivate long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcleanup(de.iip_ecosphere.platform.support.aas.Aas aas) Cleans up outdated alerts.private voidcleanup(de.iip_ecosphere.platform.support.aas.SubmodelElementCollection alerts, long timestamp) Cleans up outdated alerts.de.iip_ecosphere.platform.support.aas.AascontributeTo(de.iip_ecosphere.platform.support.aas.Aas.AasBuilder aasBuilder, de.iip_ecosphere.platform.support.aas.InvocablesCreator iCreator) voidcontributeTo(de.iip_ecosphere.platform.support.aas.ProtocolServerBuilder sBuilder) de.iip_ecosphere.platform.support.iip_aas.AasContributor.KindgetKind()private voidhandleNew(de.iip_ecosphere.platform.transport.status.Alert data) Handles a new alert and cleans up outdated ones.booleanisValid()private static StringReturns at minimum a non-empty string.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.iip_ecosphere.platform.support.iip_aas.AasContributor
exists, getAasAuthentication, getSubmodelAuthentication
-
Field Details
-
SUBMODEL_MONITORING
- See Also:
-
SMEC_ALERTS
- See Also:
-
PROPERTY_ALERT_UID
- See Also:
-
PROPERTY_ALERT_CORRELATION_ID
- See Also:
-
PROPERTY_ALERT_TIMESTAMP
- See Also:
-
PROPERTY_ALERT_FIRSTTIMESTAMP
- See Also:
-
PROPERTY_ALERT_LASTTIMESTAMP
- See Also:
-
PROPERTY_ALERT_CLEARTIMESTAMP
- See Also:
-
PROPERTY_ALERT_SOURCE
- See Also:
-
PROPERTY_ALERT_NAME
- See Also:
-
PROPERTY_ALERT_INFO
- See Also:
-
PROPERTY_ALERT_INSTANCE
- See Also:
-
PROPERTY_ALERT_SEVERITY
- See Also:
-
PROPERTY_ALERT_PRIORITY
- See Also:
-
PROPERTY_ALERT_TAGS
- See Also:
-
PROPERTY_ALERT_DESCRIPTION
- See Also:
-
PROPERTY_ALERT_EVENT_TYPE
- See Also:
-
PROPERTY_ALERT_PROBABLE_CAUSE
- See Also:
-
PROPERTY_ALERT_CURRENT_VALUE
- See Also:
-
PROPERTY_ALERT_URL
- See Also:
-
PROPERTY_ALERT_STATUS
- See Also:
-
PROPERTY_ALERT_RULE_EXPRESSION
- See Also:
-
PROPERTY_ALERT_RULE_TIME_LIMIT
- See Also:
-
timeout
private long timeout -
lastCleanup
private long lastCleanup -
cleanupTimeout
private long cleanupTimeout
-
-
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:
contributeToin interfacede.iip_ecosphere.platform.support.iip_aas.AasContributor
-
contributeTo
public void contributeTo(de.iip_ecosphere.platform.support.aas.ProtocolServerBuilder sBuilder) - Specified by:
contributeToin interfacede.iip_ecosphere.platform.support.iip_aas.AasContributor
-
isValid
public boolean isValid()- Specified by:
isValidin interfacede.iip_ecosphere.platform.support.iip_aas.AasContributor
-
getKind
public de.iip_ecosphere.platform.support.iip_aas.AasContributor.Kind getKind()- Specified by:
getKindin interfacede.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
Returns at minimum a non-empty string.- Parameters:
string- the input string- Returns:
stringor 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
-