Class MyChannelConnector<CO,CI>
java.lang.Object
de.iip_ecosphere.platform.connectors.AbstractConnector<byte[],byte[],CO,CI>
de.iip_ecosphere.platform.connectors.AbstractChannelConnector<byte[],byte[],CO,CI>
test.de.iip_ecosphere.platform.connectors.MyChannelConnector<CO,CI>
- Type Parameters:
CO- the connector output typeCI- the connector input type
- All Implemented Interfaces:
de.iip_ecosphere.platform.connectors.Connector<byte[],,byte[], CO, CI> de.iip_ecosphere.platform.connectors.events.EventHandlingConnector,de.iip_ecosphere.platform.connectors.model.AbstractModelAccess.NotificationChangedListener
@MachineConnector(hasModel=false,
supportsEvents=false,
supportsHierarchicalQNames=false,
supportsModelCalls=false,
supportsModelProperties=false,
supportsModelStructs=false,
specificSettings={})
public class MyChannelConnector<CO,CI>
extends de.iip_ecosphere.platform.connectors.AbstractChannelConnector<byte[],byte[],CO,CI>
Implements a testing connector. However, we have to "emulate" the underlying protocol
in the same class so that testing can ingest/access the data.
- Author:
- Holger Eichelberger, SSE
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe descriptor of this connector (see META-INF/services).Nested classes/interfaces inherited from class de.iip_ecosphere.platform.connectors.AbstractConnector
de.iip_ecosphere.platform.connectors.AbstractConnector.BasicAdapterProvider -
Field Summary
FieldsFields inherited from class de.iip_ecosphere.platform.connectors.AbstractConnector
DEFAULT_CHANNEL -
Constructor Summary
ConstructorsConstructorDescriptionMyChannelConnector(de.iip_ecosphere.platform.connectors.types.ChannelProtocolAdapter<byte[], byte[], CO, CI>... adapter) Creates a channel connector instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconnectImpl(de.iip_ecosphere.platform.connectors.ConnectorParameter params) voidvoiddispose()protected voidgetName()voidoffer(byte[] data) Offer something to the connector, i.e., play the protocol.byte[]Polls a received data element.protected byte[]read()protected voidMethods inherited from class de.iip_ecosphere.platform.connectors.AbstractChannelConnector
getOutputChannels, getSelector, initSelector, request, write, writeImplMethods 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, getStorageValue, initializeModelAccess, installPollTask, isPolling, notificationsChanged, notifyDataTimeDifference, notifyReconfigured, received, received, request, setDataTimeDifference, setDataTimeDifferenceProvider, setInstanceIdentification, setReceptionCallback, setStorageValue, trigger, trigger, uninstallPollTask, useTlsMethods 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
-
NAME
- See Also:
-
offers
-
received
-
-
Constructor Details
-
MyChannelConnector
@SafeVarargs public MyChannelConnector(de.iip_ecosphere.platform.connectors.types.ChannelProtocolAdapter<byte[], byte[], CO, CI>... adapter) Creates a channel connector instance.- Parameters:
adapter- the protocol adapter
-
-
Method Details
-
connectImpl
protected void connectImpl(de.iip_ecosphere.platform.connectors.ConnectorParameter params) throws IOException - Specified by:
connectImplin classde.iip_ecosphere.platform.connectors.AbstractConnector<byte[],byte[], CO, CI> - Throws:
IOException
-
disconnectImpl
- Specified by:
disconnectImplin classde.iip_ecosphere.platform.connectors.AbstractConnector<byte[],byte[], CO, CI> - Throws:
IOException
-
dispose
public void dispose() -
getName
-
writeImpl
- Specified by:
writeImplin classde.iip_ecosphere.platform.connectors.AbstractChannelConnector<byte[],byte[], CO, CI> - Throws:
IOException
-
read
- Specified by:
readin classde.iip_ecosphere.platform.connectors.AbstractConnector<byte[],byte[], CO, CI> - Throws:
IOException
-
error
-
offer
public void offer(byte[] data) Offer something to the connector, i.e., play the protocol.- Parameters:
data- the data
-
pollReceived
public byte[] pollReceived()Polls a received data element.- Returns:
- the received element, null for nothing received
-
supportedEncryption
-
enabledEncryption
-