Class AbstractPluginConnectorDescriptor<TO,TI>

java.lang.Object
de.iip_ecosphere.platform.support.plugins.DefaultPluginDescriptor<ConnectorDescriptor>
de.iip_ecosphere.platform.support.plugins.SingletonPluginDescriptor<ConnectorDescriptor>
de.iip_ecosphere.platform.connectors.AbstractPluginConnectorDescriptor<TO,TI>
Type Parameters:
TO - adapted external output type, shall be taken from implementation
TI - adapted external input type, shall be taken from implementation
All Implemented Interfaces:
ConnectorDescriptor, de.iip_ecosphere.platform.support.plugins.PluginDescriptor<ConnectorDescriptor>

public abstract class AbstractPluginConnectorDescriptor<TO,TI> extends de.iip_ecosphere.platform.support.plugins.SingletonPluginDescriptor<ConnectorDescriptor> implements ConnectorDescriptor
Basic connector descriptor implementation. Concrete implementations must redefine the plugin id. Delegates the connector creation to potentially adapted output and input types of a typical connector implementation. By default, the additional/secondary plugin id is the qualified class name of ConnectorDescriptor.getConnectorType().
Author:
Holger Eichelberger, SSE
  • Constructor Details

    • AbstractPluginConnectorDescriptor

      public AbstractPluginConnectorDescriptor()
      Creates a descriptor instance. Concrete implementations must redefine the plugin id.
  • Method Details

    • initPluginSupplier

      protected de.iip_ecosphere.platform.support.plugins.DefaultPluginDescriptor.PluginSupplier<ConnectorDescriptor> initPluginSupplier(de.iip_ecosphere.platform.support.plugins.DefaultPluginDescriptor.PluginSupplier<ConnectorDescriptor> pluginSupplier)
      Overrides:
      initPluginSupplier in class de.iip_ecosphere.platform.support.plugins.DefaultPluginDescriptor<ConnectorDescriptor>
    • initId

      protected abstract String initId(String id)
      Overrides:
      initId in class de.iip_ecosphere.platform.support.plugins.DefaultPluginDescriptor<ConnectorDescriptor>
    • initIds

      protected List<String> initIds(List<String> ids)
      Overrides:
      initIds in class de.iip_ecosphere.platform.support.plugins.DefaultPluginDescriptor<ConnectorDescriptor>
    • additionalIds

      protected List<String> additionalIds()
      Additional ids besides the qualified name of ConnectorDescriptor.getConnectorType().
      Returns:
      the additional ids, may be null or empty for none
    • createConnector

      public <O, I, CO, CI, S extends AdapterSelector<O, I, CO, CI>, A extends ProtocolAdapter<O, I, CO, CI>> Connector<O,I,CO,CI> createConnector(S selector, Supplier<ConnectorParameter> params, A... adapter)
      Description copied from interface: ConnectorDescriptor
      Creates a connector instance.
      Specified by:
      createConnector in interface ConnectorDescriptor
      Type Parameters:
      O - the output type from the underlying machine/platform/external sinksource
      I - the input type to the underlying machine/platform/external sinksource
      CO - the output type of the connector
      CI - the input type of the connector
      S - the protocol selector type
      A - the protocol adapter type
      Parameters:
      selector - the protocol selector, may be null for none
      params - the connector parameters supplier
      adapter - the protocol adapters to create the connector for
      Returns:
      the created connector
    • createConnector

      public <O, I, CO, CI, A extends ProtocolAdapter<O, I, CO, CI>> Connector<O,I,CO,CI> createConnector(Supplier<ConnectorParameter> params, A... adapter)
      Description copied from interface: ConnectorDescriptor
      Creates a connector instance.
      Specified by:
      createConnector in interface ConnectorDescriptor
      Type Parameters:
      O - the output type from the underlying machine/platform/external sinksource
      I - the input type to the underlying machine/platform/external sinksource
      CO - the output type of the connector
      CI - the input type of the connector
      A - the protocol adapter type
      Parameters:
      params - the connector parameters supplier
      adapter - the protocol adapters to create the connector for
      Returns:
      the created connector
    • createConnectorImpl

      protected <O, I, CO, CI, A extends ProtocolAdapter<TO, TI, CO, CI>> Connector<TO,TI,CO,CI> createConnectorImpl(Supplier<ConnectorParameter> params, A... adapter)
      Creates a connector instance based on adapted types.
      Type Parameters:
      O - the output type from the underlying machine/platform/external sinksource
      I - the input type to the underlying machine/platform/external sinksource
      CO - the output type of the connector
      CI - the input type of the connector
      A - the protocol adapter type
      Parameters:
      params - the connector parameters supplier
      adapter - the protocol adapters to create the connector for
      Returns:
      the created connector
    • createConnectorImpl

      protected abstract <O, I, CO, CI, S extends AdapterSelector<TO, TI, CO, CI>, A extends ProtocolAdapter<TO, TI, CO, CI>> Connector<TO,TI,CO,CI> createConnectorImpl(S selector, Supplier<ConnectorParameter> params, A... adapter)
      Creates a connector instance based on adapted types.
      Type Parameters:
      O - the output type from the underlying machine/platform/external sinksource
      I - the input type to the underlying machine/platform/external sinksource
      CO - the output type of the connector
      CI - the input type of the connector
      S - the protocol selector type
      A - the protocol adapter type
      Parameters:
      selector - the protocol selector, may be null for none
      params - the connector parameters supplier
      adapter - the protocol adapters to create the connector for
      Returns:
      the created connector