Interface CommunicationStack<I,O>
- Type Parameters:
I- The type of the input this communication stack expects.O- The type of the response this communication stack returns.
- All Known Implementing Classes:
CommunicationStackLayer,CommunicationStackTerminator
public interface CommunicationStack<I,O>
Marks the implementing class as layer within a communication stack. It
represents a designated step within a request and response handling strategy.
- Author:
- Markus Lauer, Ulrich Kreher
-
Method Summary
-
Method Details
-
process
O process(URI remoteIdentifier, I input) throws de.aristaflow.adept2.model.communication.CommunicationStackException Handles the request and returns the response.It accepts the request as input, modifies it accordingly to the functionality this layer is meant for and delegates it to the lower communication stack layer. Beside it modifies the response returned by the lower communication stack layer and returns the result.
If this component is instructed to shutdown by calling
shutdown()this method returns immediately by throwing a appropriateCommunicationStackException.- Parameters:
remoteIdentifier- The identifier of the object/service the request is targeted at. This may benullin case the information is not available for the communication service. This information may also be provided by the input parameter (for instance in anInvocationMessage.input- The request in the form of what this layer expects.- Returns:
- The response
- Throws:
de.aristaflow.adept2.model.communication.CommunicationStackException- If there are problems processing the request, aCommunicationStackExceptionwill be thrown. This may encapsulate any occurred exception.
-
shutdown
void shutdown()Initiate the shutdown of the communication stack.
-