Class ConnectorImpl<CO,CI>

java.lang.Object
de.iip_ecosphere.platform.connectors.AbstractConnector<Object,Object,CO,CI>
test.de.iip_ecosphere.platform.services.environment.ConnectorImpl<CO,CI>
Type Parameters:
CO - the output type of the connector (towards the platform)
CI - the input type of the connector (from the platform)
All Implemented Interfaces:
de.iip_ecosphere.platform.connectors.Connector<Object,Object,CO,CI>, de.iip_ecosphere.platform.connectors.events.EventHandlingConnector, de.iip_ecosphere.platform.connectors.model.AbstractModelAccess.NotificationChangedListener

@MachineConnector(hasModel=true, supportsModelStructs=false, supportsEvents=false, specificSettings={}) public class ConnectorImpl<CO,CI> extends de.iip_ecosphere.platform.connectors.AbstractConnector<Object,Object,CO,CI>
The connector of the routing test app. This connector is a generic connector, which is not further specialized in the model or the generation (for demonstration). Thus, the Object type in the template parameters is dictated by the default value of the generation, i.e., Object. The default connector type of the generation is a model connector, thus we provide an implementation of the ModelAccess type.
Author:
Holger Eichelberger, SSE
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    private class 
    Implements the model access.

    Nested classes/interfaces inherited from class de.iip_ecosphere.platform.connectors.AbstractConnector

    de.iip_ecosphere.platform.connectors.AbstractConnector.BasicAdapterProvider
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final Object
     
    private static final de.iip_ecosphere.platform.support.logging.Logger
     

    Fields inherited from class de.iip_ecosphere.platform.connectors.AbstractConnector

    DEFAULT_CHANNEL
  • Constructor Summary

    Constructors
    Constructor
    Description
    ConnectorImpl(de.iip_ecosphere.platform.connectors.AdapterSelector<Object,Object,CO,CI> selector, de.iip_ecosphere.platform.connectors.types.ProtocolAdapter<Object,Object,CO,CI>... adapter)
    Creates an instance and installs the protocol adapter.
    ConnectorImpl(de.iip_ecosphere.platform.connectors.types.ProtocolAdapter<Object,Object,CO,CI>... adapter)
    Creates an instance and installs the protocol adapter.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    connectImpl(de.iip_ecosphere.platform.connectors.ConnectorParameter params)
     
    protected void
     
    void
     
     
    protected void
    error(String message, Throwable th)
     
     
    protected Object
     
     
    protected void
     

    Methods inherited from class de.iip_ecosphere.platform.connectors.AbstractConnector

    checkCache, configureAdapter, configureModelAccess, connect, createTlsContext, disconnect, doPolling, enableNotifications, enablePolling, getCachingStrategy, getCachingStrategyCls, getConnectorInputType, getConnectorOutputType, getConnectorParameter, getInitCachingStrategyCls, getInstanceIdentification, getProtocolInputType, getProtocolOutputType, getSelector, getStorageValue, initializeModelAccess, initSelector, installPollTask, isPolling, notificationsChanged, notifyDataTimeDifference, notifyReconfigured, received, received, request, request, setDataTimeDifference, setDataTimeDifferenceProvider, setInstanceIdentification, setReceptionCallback, setStorageValue, trigger, trigger, uninstallPollTask, useTls, write

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface de.iip_ecosphere.platform.connectors.Connector

    createSharedSpace, disconnectSafe, enableSharedSpace, setReceptionCallbackSafe
  • Field Details

    • DUMMY

      private static final Object DUMMY
    • LOGGER

      private static final de.iip_ecosphere.platform.support.logging.Logger LOGGER
  • Constructor Details

    • ConnectorImpl

      @SafeVarargs public ConnectorImpl(de.iip_ecosphere.platform.connectors.types.ProtocolAdapter<Object,Object,CO,CI>... adapter)
      Creates an instance and installs the protocol adapter.
      Parameters:
      adapter - the protocol adapter(s)
      Throws:
      IllegalArgumentException - if adapter is null or empty or adapters are null
    • ConnectorImpl

      @SafeVarargs public ConnectorImpl(de.iip_ecosphere.platform.connectors.AdapterSelector<Object,Object,CO,CI> selector, de.iip_ecosphere.platform.connectors.types.ProtocolAdapter<Object,Object,CO,CI>... adapter)
      Creates an instance and installs the protocol adapter.
      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
  • Method Details

    • dispose

      public void dispose()
      Specified by:
      dispose in interface de.iip_ecosphere.platform.connectors.Connector<Object,Object,CO,CI>
      Overrides:
      dispose in class de.iip_ecosphere.platform.connectors.AbstractConnector<Object,Object,CO,CI>
    • getName

      public String getName()
    • supportedEncryption

      public String supportedEncryption()
    • enabledEncryption

      public String enabledEncryption()
    • connectImpl

      protected void connectImpl(de.iip_ecosphere.platform.connectors.ConnectorParameter params) throws IOException
      Specified by:
      connectImpl in class de.iip_ecosphere.platform.connectors.AbstractConnector<Object,Object,CO,CI>
      Throws:
      IOException
    • disconnectImpl

      protected void disconnectImpl() throws IOException
      Specified by:
      disconnectImpl in class de.iip_ecosphere.platform.connectors.AbstractConnector<Object,Object,CO,CI>
      Throws:
      IOException
    • writeImpl

      protected void writeImpl(Object data) throws IOException
      Specified by:
      writeImpl in class de.iip_ecosphere.platform.connectors.AbstractConnector<Object,Object,CO,CI>
      Throws:
      IOException
    • read

      protected Object read() throws IOException
      Specified by:
      read in class de.iip_ecosphere.platform.connectors.AbstractConnector<Object,Object,CO,CI>
      Throws:
      IOException
    • error

      protected void error(String message, Throwable th)
      Specified by:
      error in class de.iip_ecosphere.platform.connectors.AbstractConnector<Object,Object,CO,CI>