Class DirectMemoryTransferTransportConnector

java.lang.Object
de.iip_ecosphere.platform.transport.connectors.impl.AbstractTransportConnector
de.iip_ecosphere.platform.transport.connectors.impl.DirectMemoryTransferTransportConnector
All Implemented Interfaces:
TransportConnector

public class DirectMemoryTransferTransportConnector extends AbstractTransportConnector
Does a direct memory transfer.
Author:
Holger Eichelberger, SSE
  • Field Details

  • Constructor Details

    • DirectMemoryTransferTransportConnector

      public DirectMemoryTransferTransportConnector()
  • Method Details

    • setReceptionCallback

      public void setReceptionCallback(String stream, ReceptionCallback<?> callback) throws IOException
      Description copied from interface: TransportConnector
      Attaches a reception callback to stream. The callback is called upon a reception. Implicitly subscribes to channel.
      Specified by:
      setReceptionCallback in interface TransportConnector
      Overrides:
      setReceptionCallback in class AbstractTransportConnector
      Parameters:
      stream - the stream to attach the reception to
      callback - the callback to attach
      Throws:
      IOException - in case that problems during registering the callback (e.g., during subscription) happens
    • unsubscribe

      public void unsubscribe(String stream, boolean delete) throws IOException
      Description copied from interface: TransportConnector
      Unsubscribes from a channel implicitly subscribed with TransportConnector.setReceptionCallback(String, ReceptionCallback).
      Specified by:
      unsubscribe in interface TransportConnector
      Overrides:
      unsubscribe in class AbstractTransportConnector
      Parameters:
      stream - the stream to unsubscribe from
      delete - if true, try to delete/clean up the communication side on the server (may not be supported by the implementing connector, is ignored then)
      Throws:
      IOException - if the action fails for some reason
    • syncSend

      public void syncSend(String stream, Object data) throws IOException
      Description copied from interface: TransportConnector
      Sends the given data on stream in synchronized manner, e.g., by blocking this call until the data is sent.
      Parameters:
      stream - the stream to send to
      data - the data to send to stream
      Throws:
      IOException - in case that problems during the connection happens
    • transfer

      private final <T> void transfer(String stream, Object data) throws IOException
      Transfers data to stream.
      Type Parameters:
      T - the type of data
      Parameters:
      stream - the stream
      data - the data
      Throws:
      IOException - if the transfer fails
    • asyncSend

      public void asyncSend(String stream, Object data) throws IOException
      Description copied from interface: TransportConnector
      Sends the given data on stream in asnychronous manner, e.g., by not blocking this call until the data is sent, i.e., sending may not be completed when this method returns. If not possible for this connector, the underlying implementation may resort to synchronized sending.
      Parameters:
      stream - the stream to send to
      data - the data to send to stream
      Throws:
      IOException - in case that problems during the connection happens
    • composeStreamName

      public String composeStreamName(String parent, String name)
      Description copied from interface: TransportConnector
      Composes a hierarchical stream name (in the syntax/semantics of the connector).
      Parameters:
      parent - the parent name (may be TransportConnector.EMPTY_PARENT for top-level streams)
      name - the name of the stream
      Returns:
      the composed name
    • getName

      public String getName()
      Description copied from interface: TransportConnector
      Returns a descriptive name of the transport protocol being implemented.
      Returns:
      the name of the protocol
    • clear

      public void clear()
      Clears everything.
    • supportedEncryption

      public String supportedEncryption()
      Description copied from interface: TransportConnector
      Returns the supported encryption mechanisms.
      Returns:
      the supported encryption mechanisms (comma-separated), may be null or empty
    • enabledEncryption

      public String enabledEncryption()
      Description copied from interface: TransportConnector
      Returns the actually enabled encryption mechanisms on this instance. The result may change when connecting the connector.
      Returns:
      the enabled encryption mechanisms (comma-separated), may be null or empty