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 java.lang.Object implements de.iip_ecosphere.platform.support.iip_aas.AasContributorImplements the transport AAS contributor. Do not rename, this class is referenced inMETA-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 Classes Modifier and Type Class Description private static classConnectorsAas.DefaultAnnotationProviderWe use this class only for reading out the default values of an annotation if none is present on a connector.
-
Field Summary
Fields Modifier and Type Field Description private static org.slf4j.LoggerLOGGERstatic java.lang.StringNAME_CONNECTORS_SUBMODELstatic java.lang.StringNAME_DESC_VAR_HAS_MODELstatic java.lang.StringNAME_DESC_VAR_NAMEstatic java.lang.StringNAME_DESC_VAR_SUPPORTS_CALLSstatic java.lang.StringNAME_DESC_VAR_SUPPORTS_EVENTSstatic java.lang.StringNAME_DESC_VAR_SUPPORTS_PROPERTIESstatic java.lang.StringNAME_DESC_VAR_SUPPORTS_QNAMESstatic java.lang.StringNAME_DESC_VAR_SUPPORTS_STRUCTSstatic java.lang.StringNAME_DESCRIPTORS_SUBMODELstatic java.lang.StringNAME_SMC_CONNECTOR_PREFIXstatic java.lang.StringNAME_SMC_VAR_CONNECTORstatic java.lang.StringNAME_SMC_VAR_DESCRIPTORstatic java.lang.StringNAME_SMC_VAR_ENABLED_ENCstatic java.lang.StringNAME_SMC_VAR_INstatic java.lang.StringNAME_SMC_VAR_OUTstatic java.lang.StringNAME_SMC_VAR_SUPPORTED_ENC
-
Constructor Summary
Constructors Constructor Description ConnectorsAas()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static voidaddAnnotationInformation(de.iip_ecosphere.platform.support.aas.SubmodelElementCollection.SubmodelElementCollectionBuilder smcb, java.lang.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(java.lang.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 java.lang.StringtoValidString(java.lang.String string)Returns a "valid" string turning null into an empty string.
-
-
-
Field Detail
-
NAME_DESCRIPTORS_SUBMODEL
public static final java.lang.String NAME_DESCRIPTORS_SUBMODEL
- See Also:
- Constant Field Values
-
NAME_DESC_VAR_NAME
public static final java.lang.String NAME_DESC_VAR_NAME
- See Also:
- Constant Field Values
-
NAME_DESC_VAR_SUPPORTS_EVENTS
public static final java.lang.String NAME_DESC_VAR_SUPPORTS_EVENTS
- See Also:
- Constant Field Values
-
NAME_DESC_VAR_HAS_MODEL
public static final java.lang.String NAME_DESC_VAR_HAS_MODEL
- See Also:
- Constant Field Values
-
NAME_DESC_VAR_SUPPORTS_QNAMES
public static final java.lang.String NAME_DESC_VAR_SUPPORTS_QNAMES
- See Also:
- Constant Field Values
-
NAME_DESC_VAR_SUPPORTS_PROPERTIES
public static final java.lang.String NAME_DESC_VAR_SUPPORTS_PROPERTIES
- See Also:
- Constant Field Values
-
NAME_DESC_VAR_SUPPORTS_CALLS
public static final java.lang.String NAME_DESC_VAR_SUPPORTS_CALLS
- See Also:
- Constant Field Values
-
NAME_DESC_VAR_SUPPORTS_STRUCTS
public static final java.lang.String NAME_DESC_VAR_SUPPORTS_STRUCTS
- See Also:
- Constant Field Values
-
NAME_CONNECTORS_SUBMODEL
public static final java.lang.String NAME_CONNECTORS_SUBMODEL
- See Also:
- Constant Field Values
-
NAME_SMC_CONNECTOR_PREFIX
public static final java.lang.String NAME_SMC_CONNECTOR_PREFIX
- See Also:
- Constant Field Values
-
NAME_SMC_VAR_CONNECTOR
public static final java.lang.String NAME_SMC_VAR_CONNECTOR
- See Also:
- Constant Field Values
-
NAME_SMC_VAR_OUT
public static final java.lang.String NAME_SMC_VAR_OUT
- See Also:
- Constant Field Values
-
NAME_SMC_VAR_IN
public static final java.lang.String NAME_SMC_VAR_IN
- See Also:
- Constant Field Values
-
NAME_SMC_VAR_DESCRIPTOR
public static final java.lang.String NAME_SMC_VAR_DESCRIPTOR
- See Also:
- Constant Field Values
-
NAME_SMC_VAR_SUPPORTED_ENC
public static final java.lang.String NAME_SMC_VAR_SUPPORTED_ENC
- See Also:
- Constant Field Values
-
NAME_SMC_VAR_ENABLED_ENC
public static final java.lang.String NAME_SMC_VAR_ENABLED_ENC
- See Also:
- Constant Field Values
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
-
Method Detail
-
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
static void notifyRemoveConnector(Connector<?,?,?,?> connector)
Called to notify that a connector instance is about to be discarded/removed.- Parameters:
connector- the connector instance
-
notifyAddConnector
static void notifyAddConnector(Connector<?,?,?,?> connector)
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
private static java.lang.String toValidString(java.lang.String string)
Returns a "valid" string turning null into an empty string.- Parameters:
string- the string to be considered- Returns:
- the "valid" string
-
getMachineConnectorAnnotation
public static MachineConnector getMachineConnectorAnnotation(java.lang.Class<?> cls)
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, java.lang.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
-
-