- Type Parameters:
Context- Context type.
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface SideEffectService<Context> extends Service<Context,State>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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description
handle(@NonNull Context context)Consumes the context, if possible.
handleConsumes the context, if possible. Returns
State.ACCEPTEDif the input was consumed, else
- Specified by:
context- context used in the generation of the response
- 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.
Exception- Any exception that occurs during the handling can be thrown, and will be wrapped by a