Interface CommStackInterceptor<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.
public interface CommStackInterceptor<I1,I2,O1,O2>
An interceptor for a communication stack. In contrast to a layer which has a fixed position within a communication stack, an interceptor is applied dynamically to a communication stack. All calls have to be forwarded to the communication stack provided to the interceptor.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description O2
process(URI remoteIdentifier, I1 input, CommunicationStack<I2,O1> commStack)
Intercepts the communication processing and forwards it to the designated communication stack.void
shutdown()
Initiate the shutdown of the communication stack interceptor.
-
-
-
Method Detail
-
process
O2 process(URI remoteIdentifier, I1 input, CommunicationStack<I2,O1> commStack) throws de.aristaflow.adept2.model.communication.CommunicationStackException
Intercepts the communication processing and forwards it to the designated communication stack.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 benull
in 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 interceptor expects.commStack
- The communication stack to which to forward the processing.- Returns:
- The response of the processing.
- Throws:
de.aristaflow.adept2.model.communication.CommunicationStackException
- If there are problems processing the request, aCommunicationStackException
will be thrown. This may encapsulate any occurred exception.
-
shutdown
void shutdown()
Initiate the shutdown of the communication stack interceptor.
-
-