Interface CommandBusInterceptor
public interface CommandBusInterceptor
An
CommandBusInterceptor allows you to intercept Commands before and after they're being handled by the LocalCommandBus-
Method Summary
Modifier and TypeMethodDescriptiondefault ObjectinterceptSend(Object command, CommandBusInterceptorChain commandBusInterceptorChain) Intercept theAbstractCommandBus.send(Object)operationdefault voidinterceptSendAndDontWait(Object commandMessage, CommandBusInterceptorChain commandBusInterceptorChain) Intercept theLocalCommandBus.sendAndDontWait(Object)operationdefault ObjectinterceptSendAsync(Object command, CommandBusInterceptorChain commandBusInterceptorChain) Intercept theAbstractCommandBus.sendAsync(Object)operation
-
Method Details
-
interceptSend
Intercept theAbstractCommandBus.send(Object)operation- Parameters:
command- the commandcommandBusInterceptorChain- the interceptor chain- Returns:
- the result of processing the command (default implementation just calls
CommandBusInterceptorChain.proceed())
-
interceptSendAsync
default Object interceptSendAsync(Object command, CommandBusInterceptorChain commandBusInterceptorChain) Intercept theAbstractCommandBus.sendAsync(Object)operation- Parameters:
command- the commandcommandBusInterceptorChain- the interceptor chain- Returns:
- the result of processing the command (default implementation just calls
CommandBusInterceptorChain.proceed())
-
interceptSendAndDontWait
default void interceptSendAndDontWait(Object commandMessage, CommandBusInterceptorChain commandBusInterceptorChain) Intercept theLocalCommandBus.sendAndDontWait(Object)operation- Parameters:
commandMessage- the command message (can be wrapped in an infrastructure wrapper, such as a Message/QueuedMessage, depending on which transport channel is used)commandBusInterceptorChain- the interceptor chain
-