Package io.mats3.api.intercept
Interface MatsStageInterceptor.MatsStageInterceptUserLambda
- Enclosing interface:
- MatsStageInterceptor
public static interface MatsStageInterceptor.MatsStageInterceptUserLambda
Enables the intercepting of the invocation of the "user lambda" in a Stage, with ability to wrap the
MatsEndpoint.ProcessContext
(and thus modify any reply, request, next or initiations) and/or modifying state and
message - or even take over the entire stage. Wrt. changing messages, you should also consider
MatsStageInterceptor.MatsStageInterceptOutgoingMessages.stageInterceptOutgoingMessages(StageInterceptOutgoingMessageContext)
.
Default implementation is to call directly through - and if overriding, you also need to call through to get the
actual stage to execute.
Pulled out in separate interface, so that we don't need to invoke it if the interceptor doesn't need it.-
Method Summary
Modifier and TypeMethodDescriptiondefault void
stageInterceptUserLambda
(MatsStageInterceptor.StageInterceptUserLambdaContext context, MatsEndpoint.ProcessLambda<Object, Object, Object> processLambda, MatsEndpoint.ProcessContext<Object> ctx, Object state, Object msg)
-
Method Details
-
stageInterceptUserLambda
default void stageInterceptUserLambda(MatsStageInterceptor.StageInterceptUserLambdaContext context, MatsEndpoint.ProcessLambda<Object, Object, throws MatsEndpoint.MatsRefuseMessageExceptionObject> processLambda, MatsEndpoint.ProcessContext<Object> ctx, Object state, Object msg)
-