Package de.iip_ecosphere.platform.connectors
package de.iip_ecosphere.platform.connectors
The connectors component defining the interface to generic machine/platform connectors. Main classes here are the
connector interfaceconnector annotationdeclaring the capabilities of the connector, e.g., to be dynamically taken up by the code generationconnector parameterswhen connecting to a server/broker (including some security information likeIdentityToken).
ModelAccess. For other protocols like MQTT this information model
is optional.
Connectors have several template parameters, including the data types accessible from the platform (CI for
input into the connector, CO for output produced by the connector), the internal data types to be handed over
to the underlying protocol implementation (I for input into the protocol, O for output from the
protocol) and D for the value data type used in the optional
model. For payload-based protocols like MQTT,
I and O define the payload type, usually byte[] while CI and CO are left open
to be handled by plugins based on InputTypeTranslator and
OutputTypeTranslator. For model-based protocols like OPC,
I and O are of less significance as the attached type translators directly query the model and
produce from that instances of CO or read instances of CI. However, more information must be set
up there, so the type translators are refined into
ConnectorInputTypeTranslator and
ConnectorOutputTypeTranslator.
A connector shall define a ConnectorDescriptor as top-level
inner class and register the descriptor as service, i.e. provide
de.iip_ecosphere.platform.connectors.ConnectorDescriptor file in the META-INF/services folder.
To ease working with the type translations, a connector may have a
ProtocolAdapter, its basic implementation
TranslatingProtocolAdapter utilizes the refined type
transformators. Channel-based protocols like MQTT require even more information, here provided through
ChannelProtocolAdapter.
Moreover, basic implementations for connectors,
model access or even the type translators
is desirable, as required conventions are already implemented. Thus, when setting up a new connector, please take
these classes into account.
In some situations it would be desirable to reuse existing
serializers. Therefore, we offer the type
translation adapters ConnectorInputTypeAdapter and
ConnectorOutputTypeAdapter. They can optionally be used as
input arguments while connector creation.-
ClassDescriptionAbstractChannelConnector<O,
I, CO, CI> Defines a basic channeled connector.AbstractConnector<O,I, CO, CI> Provides a reusable base of aConnectorimplementation using theProtocolAdapter.Basic connector descriptor implementation.Basic connector descriptor implementation.AbstractThreadedConnector<O,I, CO, CI, M extends ModelAccess> Provides a reusable base for connectors that require aModelAccessinstance per calling thread.AdapterSelector<O,I, CO, CI> Selects a protocol adapter based on the given machine data.AdapterSelector.AdapterProvider<O,I, CO, CI> Provides access to adapter data.Defines a pluggable caching strategy.ChannelAdapterSelector<O,I, CO, CI> Selects a protocol adapter based on the given machine data for channel connectors.RefinesAdapterSelector.AdapterProvider.Connector<O,I, CO, CI> The interface of a platform/machine connector.Describes a connector without instantiating it.Descriptor that allows for connector-specific extensions.A default implementation ofConnectorExtensionDescriptorchecking for identifier equality and providing the extension value throughConnectorExtensionDescriptor.getConnectorExtensionValue(Class, Supplier, Supplier).ConnectorFactory<O,I, CO, CI, A extends ProtocolAdapter<O, I, CO, CI>> Creates a single connector instance or allows to dynamically choose among multiple connector types of the same kind.Defines the connection parameters for aConnector.Modes for caching data avoiding repeated ingestion.Builds a connector parameter object.Declares the type of a connector plugin descriptor.A service type/instance registry as internal structure to manage the contents of an AAS for this component.Implements the transport AAS contributor.We use this class only for reading out the default values of an annotation if none is present on a connector.A default caching strategy.A functor indicating that two objects are considered the same.Indicates the capabilities of a connector.Indicates supportedConnectorTriggerQuery.