Class ConnectorsAas
java.lang.Object
de.iip_ecosphere.platform.connectors.ConnectorsAas
- All Implemented Interfaces:
de.iip_ecosphere.platform.support.iip_aas.AasContributor
public class ConnectorsAas
extends Object
implements de.iip_ecosphere.platform.support.iip_aas.AasContributor
Implements the transport AAS contributor. Do not rename, this class is referenced in
META-INF/services.
The following structure is built up:
- submodel: installedConnectors
- submodel element connection = connector class name (not descriptor class name!)
- name = connector name
- supportsEvents = true or false
- hasModel = true or false
- supportsQualifiedNames = true or false
- supportsProperties = true or false
- supportsCalls = true or false
- supportsStructs = true or false
- submodel element connection = connector class name (not descriptor class name!)
- submodel: activeConnectors
- submodel element connection = unique id of running connector
- name = connector name
- property or referenceElement: inType = string or ref to types submodel
(see
ClassUtility) - property or referenceElement: outType = string or ref to types submodel
(see
ClassUtility) - referenceElement: descriptor = ref to respective submodel element collection in installedConnectors (present only if the descriptor is in the target submodel)
- submodel element connection = unique id of running connector
- Author:
- Holger Eichelberger, SSE
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classWe use this class only for reading out the default values of an annotation if none is present on a connector.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 static final de.iip_ecosphere.platform.support.logging.Loggerstatic 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 String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidaddAnnotationInformation(de.iip_ecosphere.platform.support.aas.SubmodelElementCollection.SubmodelElementCollectionBuilder smcb, Class<?> cls) Adds information fromMachineConnectorannotated toclsto the given sub-model element collectionsmbc.private static voidaddConnector(de.iip_ecosphere.platform.support.aas.SubmodelElementCollection.SubmodelElementCollectionBuilder smcb, Connector<?, ?, ?, ?> connector, de.iip_ecosphere.platform.support.aas.Submodel descriptors) Adds a connector to a knownsubmodelBuiler.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()static MachineConnectorgetMachineConnectorAnnotation(Class<?> cls) Returns the machine annotation forcls.booleanisValid()(package private) static voidnotifyAddConnector(Connector<?, ?, ?, ?> connector) Called to notify that a connector instance is about to be connected.(package private) static voidnotifyRemoveConnector(Connector<?, ?, ?, ?> connector) Called to notify that a connector instance is about to be discarded/removed.private static StringtoValidString(String string) Returns a "valid" string turning null into an 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
-
NAME_DESCRIPTORS_SUBMODEL
- See Also:
-
NAME_DESC_VAR_NAME
- See Also:
-
NAME_DESC_VAR_SUPPORTS_EVENTS
- See Also:
-
NAME_DESC_VAR_HAS_MODEL
- See Also:
-
NAME_DESC_VAR_SUPPORTS_QNAMES
- See Also:
-
NAME_DESC_VAR_SUPPORTS_PROPERTIES
- See Also:
-
NAME_DESC_VAR_SUPPORTS_CALLS
- See Also:
-
NAME_DESC_VAR_SUPPORTS_STRUCTS
- See Also:
-
NAME_CONNECTORS_SUBMODEL
- See Also:
-
NAME_SMC_CONNECTOR_PREFIX
- See Also:
-
NAME_SMC_VAR_CONNECTOR
- See Also:
-
NAME_SMC_VAR_OUT
- See Also:
-
NAME_SMC_VAR_IN
- See Also:
-
NAME_SMC_VAR_DESCRIPTOR
- See Also:
-
NAME_SMC_VAR_SUPPORTED_ENC
- See Also:
-
NAME_SMC_VAR_ENABLED_ENC
- See Also:
-
LOGGER
private static final de.iip_ecosphere.platform.support.logging.Logger LOGGER
-
-
Constructor Details
-
ConnectorsAas
public ConnectorsAas()
-
-
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
-
notifyRemoveConnector
Called to notify that a connector instance is about to be discarded/removed.- Parameters:
connector- the connector instance
-
notifyAddConnector
Called to notify that a connector instance is about to be connected.- Parameters:
connector- the connector instance
-
addConnector
private static void addConnector(de.iip_ecosphere.platform.support.aas.SubmodelElementCollection.SubmodelElementCollectionBuilder smcb, Connector<?, ?, ?, ?> connector, de.iip_ecosphere.platform.support.aas.Submodel descriptors) Adds a connector to a knownsubmodelBuiler.- Parameters:
smcb- the sub-model element collection builder to add the connector toconnector- the connector instancedescriptors- the descriptors sub-model
-
toValidString
Returns a "valid" string turning null into an empty string.- Parameters:
string- the string to be considered- Returns:
- the "valid" string
-
getMachineConnectorAnnotation
Returns the machine annotation forcls.- Parameters:
cls- the class to return the machine annotation for- Returns:
- the machine annotation, the one from
ConnectorsAas.DefaultAnnotationProviderif none is present
-
addAnnotationInformation
private static void addAnnotationInformation(de.iip_ecosphere.platform.support.aas.SubmodelElementCollection.SubmodelElementCollectionBuilder smcb, Class<?> cls) Adds information fromMachineConnectorannotated toclsto the given sub-model element collectionsmbc.- Parameters:
smcb- the sub-model element collection buildercls- the class to read the information from; if no annotation is present, the default annotation information fromConnectorsAas.DefaultAnnotationProviderwill be used instead
-
contributeTo
public void contributeTo(de.iip_ecosphere.platform.support.aas.ProtocolServerBuilder sBuilder) - Specified by:
contributeToin 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
-
isValid
public boolean isValid()- Specified by:
isValidin interfacede.iip_ecosphere.platform.support.iip_aas.AasContributor
-