Interface SideEffectService<Context>
- Type Parameters:
Context- Context type.
- All Known Subinterfaces:
ConsumerService<Context>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Service implementation that alters the state of the owning application in some way. A
SideEffectService does not return a generated result, instead it returns a response, indicating
whether or not the context was consumed
-
Method Summary
-
Method Details
-
handle
Consumes the context, if possible. ReturnsState.ACCEPTEDif the input was consumed, elseState.REJECTED- Specified by:
handlein interfaceService<Context,State> - Parameters:
context- context used in the generation of the response- Returns:
- Response. If the response isn't
State.ACCEPTED, the next service in the service chain will get to act on the context. Otherwise the execution halts, and the provided response is the final response. - Throws:
Exception- Any exception that occurs during the handling can be thrown, and will be wrapped by aPipelineException
-