Class AbstractThreadedConnector<O,I,CO,CI,M extends ModelAccess>

java.lang.Object
de.iip_ecosphere.platform.connectors.AbstractConnector<O,I,CO,CI>
de.iip_ecosphere.platform.connectors.AbstractThreadedConnector<O,I,CO,CI,M>
Type Parameters:
O - the output type from the underlying machine/platform
I - the input type to the underlying machine/platform
CO - the output type of the connector
CI - the input type of the connector
M - the model access type of the connector
All Implemented Interfaces:
Connector<O,I,CO,CI>, EventHandlingConnector, AbstractModelAccess.NotificationChangedListener

public abstract class AbstractThreadedConnector<O,I,CO,CI,M extends ModelAccess> extends AbstractConnector<O,I,CO,CI>
Provides a reusable base for connectors that require a ModelAccess instance per calling thread. Extends AbstractConnector implementation using the ProtocolAdapter. Call setModelAccessSupplier(Supplier) (and implicitly AbstractConnector.configureModelAccess(ModelAccess)) before connect(ConnectorParameter). Calls ModelAccess.dispose().
Author:
Holger Eichelberger, SSE
  • Field Details

  • Constructor Details

    • AbstractThreadedConnector

      @SafeVarargs protected AbstractThreadedConnector(ProtocolAdapter<O,I,CO,CI>... adapter)
      Creates an instance and installs the protocol adapter(s) with a default selector for the first adapter. For integration compatibility, connector constructors are supposed to accept a var-arg parameter for adapters.
      Parameters:
      adapter - the protocol adapter(s)
      Throws:
      IllegalArgumentException - if adapter is null or empty or adapters are null
      See Also:
    • AbstractThreadedConnector

      @SafeVarargs protected AbstractThreadedConnector(AdapterSelector<O,I,CO,CI> selector, ProtocolAdapter<O,I,CO,CI>... adapter)
      Creates an instance and installs the protocol adapter(s). For integration compatibility, connector constructors are supposed to accept a var-arg parameter for adapters.
      Parameters:
      selector - the adapter selector (null leads to a default selector for the first adapter)
      adapter - the protocol adapter(s)
      Throws:
      IllegalArgumentException - if adapter is null or empty or adapters are null
      See Also:
  • Method Details