Class DirectMemoryTransportConnectorTest.FakeConnector
java.lang.Object
test.de.iip_ecosphere.platform.transport.DirectMemoryTransportConnectorTest.FakeConnector
- All Implemented Interfaces:
de.iip_ecosphere.platform.transport.connectors.TransportConnector
- Enclosing class:
DirectMemoryTransportConnectorTest
private static class DirectMemoryTransportConnectorTest.FakeConnector
extends Object
implements de.iip_ecosphere.platform.transport.connectors.TransportConnector
Does nothing, just for testing the creation.
- Author:
- Holger Eichelberger, SSE
-
Field Summary
FieldsModifier and TypeFieldDescriptionFields inherited from interface de.iip_ecosphere.platform.transport.connectors.TransportConnector
EMPTY_PARENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcomposeStreamName(String parent, String name) voidconnect(de.iip_ecosphere.platform.transport.connectors.TransportParameter params) voiddetachReceptionCallback(String stream, de.iip_ecosphere.platform.transport.connectors.ReceptionCallback<?> callback) voidgetName()private <T> voidserializeDeserializeNotify(String stream, T data) Does a full round-trip what a usual connector does in at least two steps: serialize, look for callback, take callback deserializer, deserialize and notify.voidsetReceptionCallback(String stream, de.iip_ecosphere.platform.transport.connectors.ReceptionCallback<?> callback) voidsetSerializerProvider(de.iip_ecosphere.platform.transport.serialization.SerializerRegistry.SerializerProvider serializerProvider) voidvoidunsubscribe(String stream, boolean delete)
-
Field Details
-
callbacks
-
-
Constructor Details
-
FakeConnector
private FakeConnector()
-
-
Method Details
-
syncSend
- Specified by:
syncSendin interfacede.iip_ecosphere.platform.transport.connectors.TransportConnector- Throws:
IOException
-
asyncSend
- Specified by:
asyncSendin interfacede.iip_ecosphere.platform.transport.connectors.TransportConnector- Throws:
IOException
-
serializeDeserializeNotify
Does a full round-trip what a usual connector does in at least two steps: serialize, look for callback, take callback deserializer, deserialize and notify. Notification happens in sequence, not in parallel.- Type Parameters:
T- the data type- Parameters:
stream- the stream namedata- the data to handle- Throws:
IOException- if serialization/deserialization fails for some reason
-
setReceptionCallback
public void setReceptionCallback(String stream, de.iip_ecosphere.platform.transport.connectors.ReceptionCallback<?> callback) throws IOException - Specified by:
setReceptionCallbackin interfacede.iip_ecosphere.platform.transport.connectors.TransportConnector- Throws:
IOException
-
unsubscribe
- Specified by:
unsubscribein interfacede.iip_ecosphere.platform.transport.connectors.TransportConnector- Throws:
IOException
-
composeStreamName
- Specified by:
composeStreamNamein interfacede.iip_ecosphere.platform.transport.connectors.TransportConnector
-
connect
public void connect(de.iip_ecosphere.platform.transport.connectors.TransportParameter params) throws IOException - Specified by:
connectin interfacede.iip_ecosphere.platform.transport.connectors.TransportConnector- Throws:
IOException
-
disconnect
- Specified by:
disconnectin interfacede.iip_ecosphere.platform.transport.connectors.TransportConnector- Throws:
IOException
-
getName
- Specified by:
getNamein interfacede.iip_ecosphere.platform.transport.connectors.TransportConnector
-
supportedEncryption
- Specified by:
supportedEncryptionin interfacede.iip_ecosphere.platform.transport.connectors.TransportConnector
-
enabledEncryption
- Specified by:
enabledEncryptionin interfacede.iip_ecosphere.platform.transport.connectors.TransportConnector
-
detachReceptionCallback
public void detachReceptionCallback(String stream, de.iip_ecosphere.platform.transport.connectors.ReceptionCallback<?> callback) throws IOException - Specified by:
detachReceptionCallbackin interfacede.iip_ecosphere.platform.transport.connectors.TransportConnector- Throws:
IOException
-
setSerializerProvider
public void setSerializerProvider(de.iip_ecosphere.platform.transport.serialization.SerializerRegistry.SerializerProvider serializerProvider) - Specified by:
setSerializerProviderin interfacede.iip_ecosphere.platform.transport.connectors.TransportConnector
-