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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
shutdown()
Notifies the termination of this communication transformer.I2
transformInput(URI remoteIdentifier, I1 input)
Transforms the designated input of typeI1
to typeI2
.O2
transformOutput(URI remoteIdentifier, O1 output)
Transforms the designated input of typeO1
to typeO2
.
-
-
-
Method Detail
-
transformInput
I2 transformInput(URI remoteIdentifier, I1 input) throws de.aristaflow.adept2.model.communication.CommunicationStackException
Transforms the designated input of typeI1
to typeI2
. 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, aCommunicationStackException
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 typeO1
to typeO2
. 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, aCommunicationStackException
will be thrown. This may encapsulate any occurred exception.
-
shutdown
void shutdown()
Notifies the termination of this communication transformer.
-
-