Class MyModelConnector<CO,CI>
- Type Parameters:
CO- the connector output typeCI- the connector input type
- 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,
supportsEvents=false,
supportsHierarchicalQNames=true,
supportsModelCalls=false,
supportsModelProperties=false,
supportsModelStructs=false,
specificSettings={})
public class MyModelConnector<CO,CI>
extends de.iip_ecosphere.platform.connectors.AbstractConnector<Object,Object,CO,CI>
Implements a testing model connector.
- Author:
- Holger Eichelberger, SSE
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe descriptor of this connector (see META-INF/services).private classMimics a simple model access instance.Nested classes/interfaces inherited from class de.iip_ecosphere.platform.connectors.AbstractConnector
de.iip_ecosphere.platform.connectors.AbstractConnector.BasicAdapterProvider -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprivate de.iip_ecosphere.platform.connectors.ConnectorParameterFields inherited from class de.iip_ecosphere.platform.connectors.AbstractConnector
DEFAULT_CHANNEL -
Constructor Summary
ConstructorsConstructorDescriptionMyModelConnector(de.iip_ecosphere.platform.connectors.types.ProtocolAdapter<Object, Object, CO, CI>... adapter) Creates a model connector instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconnectImpl(de.iip_ecosphere.platform.connectors.ConnectorParameter params) voidvoiddispose()protected voidgetName()Polls a received data element.protected Objectread()voidPut something into the queue to trigger a "model modification".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
-
NAME
- See Also:
-
offers
-
received
-
params
private de.iip_ecosphere.platform.connectors.ConnectorParameter params
-
-
Constructor Details
-
MyModelConnector
@SafeVarargs public MyModelConnector(de.iip_ecosphere.platform.connectors.types.ProtocolAdapter<Object, Object, CO, CI>... adapter) Creates a model connector instance.- Parameters:
adapter- the protocol adapter(s)
-
-
Method Details
-
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
-
dispose
public void dispose() -
getName
-
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
-
testTrigger
Put something into the queue to trigger a "model modification".- Throws:
IOException- if offering fails for some reason
-
pollReceived
Polls a received data element.- Returns:
- the received element, null for nothing received
-
supportedEncryption
-
enabledEncryption
-