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 Details

    • callbacks

      private Map<String,de.iip_ecosphere.platform.transport.connectors.ReceptionCallback<?>> callbacks
  • Constructor Details

    • FakeConnector

      private FakeConnector()
  • Method Details

    • syncSend

      public void syncSend(String stream, Object data) throws IOException
      Specified by:
      syncSend in interface de.iip_ecosphere.platform.transport.connectors.TransportConnector
      Throws:
      IOException
    • asyncSend

      public void asyncSend(String stream, Object data) throws IOException
      Specified by:
      asyncSend in interface de.iip_ecosphere.platform.transport.connectors.TransportConnector
      Throws:
      IOException
    • serializeDeserializeNotify

      private <T> void serializeDeserializeNotify(String stream, T data) throws IOException
      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 name
      data - 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:
      setReceptionCallback in interface de.iip_ecosphere.platform.transport.connectors.TransportConnector
      Throws:
      IOException
    • unsubscribe

      public void unsubscribe(String stream, boolean delete) throws IOException
      Specified by:
      unsubscribe in interface de.iip_ecosphere.platform.transport.connectors.TransportConnector
      Throws:
      IOException
    • composeStreamName

      public String composeStreamName(String parent, String name)
      Specified by:
      composeStreamName in interface de.iip_ecosphere.platform.transport.connectors.TransportConnector
    • connect

      public void connect(de.iip_ecosphere.platform.transport.connectors.TransportParameter params) throws IOException
      Specified by:
      connect in interface de.iip_ecosphere.platform.transport.connectors.TransportConnector
      Throws:
      IOException
    • disconnect

      public void disconnect() throws IOException
      Specified by:
      disconnect in interface de.iip_ecosphere.platform.transport.connectors.TransportConnector
      Throws:
      IOException
    • getName

      public String getName()
      Specified by:
      getName in interface de.iip_ecosphere.platform.transport.connectors.TransportConnector
    • supportedEncryption

      public String supportedEncryption()
      Specified by:
      supportedEncryption in interface de.iip_ecosphere.platform.transport.connectors.TransportConnector
    • enabledEncryption

      public String enabledEncryption()
      Specified by:
      enabledEncryption in interface de.iip_ecosphere.platform.transport.connectors.TransportConnector
    • detachReceptionCallback

      public void detachReceptionCallback(String stream, de.iip_ecosphere.platform.transport.connectors.ReceptionCallback<?> callback) throws IOException
      Specified by:
      detachReceptionCallback in interface de.iip_ecosphere.platform.transport.connectors.TransportConnector
      Throws:
      IOException
    • setSerializerProvider

      public void setSerializerProvider(de.iip_ecosphere.platform.transport.serialization.SerializerRegistry.SerializerProvider serializerProvider)
      Specified by:
      setSerializerProvider in interface de.iip_ecosphere.platform.transport.connectors.TransportConnector