Interface CommStackTransformer<I1,I2,O1,O2>

Type Parameters:
I1 - The type of the input to be transformed.
I2 - The transformed type of the input.
O1 - The type of the output to be transformed.
O2 - The transformed type of the output.
All Known Implementing Classes:
CommunicationStackLayer

public interface CommStackTransformer<I1,I2,O1,O2>
Interface to perform transformation before and after performing a communication. This allows for converting objects to different types or simply intercept communication without any transformation. Transformation is an essential part of a communication stack layer; the main purpose of such a layer is the transformation from and to the types of the next layer.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Notifies the termination of this communication transformer.
    transformInput(URI remoteIdentifier, I1 input)
    Transforms the designated input of type I1 to type I2.
    transformOutput(URI remoteIdentifier, O1 output)
    Transforms the designated input of type O1 to type O2.
  • Method Details

    • transformInput

      I2 transformInput(URI remoteIdentifier, I1 input) throws de.aristaflow.adept2.model.communication.CommunicationStackException
      Transforms the designated input of type I1 to type I2. This is used in forward direction, i. e. request handling.
      Parameters:
      remoteIdentifier - The URI identifying the object the communication call is meant for.
      input - The input that should be transformed.
      Returns:
      The output of this transformation process ready to be passed to the lower layer of the communication stack.
      Throws:
      de.aristaflow.adept2.model.communication.CommunicationStackException - If there are problems processing the input, a CommunicationStackException will be thrown. This may encapsulate any occurred exception.
    • transformOutput

      O2 transformOutput(URI remoteIdentifier, O1 output) throws de.aristaflow.adept2.model.communication.CommunicationStackException
      Transforms the designated input of type O1 to type O2. This is used in backward direction, i. e. reply handling.
      Parameters:
      remoteIdentifier - The URI identifying the object the communication call is meant for.
      output - The output that is returned by the lower communication stack layer that should be transformed.
      Returns:
      The output of this transformation process ready to be passed to the upper layer of the communication stack.
      Throws:
      de.aristaflow.adept2.model.communication.CommunicationStackException - If there are problems processing the output, a CommunicationStackException will be thrown. This may encapsulate any occurred exception.
    • shutdown

      void shutdown()
      Notifies the termination of this communication transformer.