Class 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 ClassesModifier and TypeClassDescriptionprivate classImplements the model access.Nested classes/interfaces inherited from class de.iip_ecosphere.platform.connectors.AbstractConnector
de.iip_ecosphere.platform.connectors.AbstractConnector.BasicAdapterProvider -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Objectprivate static final de.iip_ecosphere.platform.support.logging.LoggerFields inherited from class de.iip_ecosphere.platform.connectors.AbstractConnector
DEFAULT_CHANNEL -
Constructor Summary
ConstructorsConstructorDescriptionConnectorImpl(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 TypeMethodDescriptionprotected voidconnectImpl(de.iip_ecosphere.platform.connectors.ConnectorParameter params) protected voidvoiddispose()protected voidgetName()protected Objectread()protected voidMethods 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, writeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.iip_ecosphere.platform.connectors.Connector
createSharedSpace, disconnectSafe, enableSharedSpace, setReceptionCallbackSafe
-
Field Details
-
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- ifadapteris 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- ifadapteris null or empty or adapters are null
-
-
Method Details
-
dispose
public void dispose() -
getName
-
supportedEncryption
-
enabledEncryption
-
connectImpl
protected void connectImpl(de.iip_ecosphere.platform.connectors.ConnectorParameter params) throws IOException - Specified by:
connectImplin classde.iip_ecosphere.platform.connectors.AbstractConnector<Object,Object, CO, CI> - Throws:
IOException
-
disconnectImpl
- Specified by:
disconnectImplin classde.iip_ecosphere.platform.connectors.AbstractConnector<Object,Object, CO, CI> - Throws:
IOException
-
writeImpl
- Specified by:
writeImplin classde.iip_ecosphere.platform.connectors.AbstractConnector<Object,Object, CO, CI> - Throws:
IOException
-
read
- Specified by:
readin classde.iip_ecosphere.platform.connectors.AbstractConnector<Object,Object, CO, CI> - Throws:
IOException
-
error
-