Package org.axonframework.messaging
Interface MessageDispatchInterceptor<T extends Message<?>>
- Type Parameters:
T- The message type this interceptor can process
- All Known Implementing Classes:
BeanValidationInterceptor,BeanValidationInterceptor,EventLoggingInterceptor,LoggingInterceptor,MessageAuthorizationDispatchInterceptor
public interface MessageDispatchInterceptor<T extends Message<?>>
Interceptor that allows messages to be intercepted and modified before they are dispatched. This interceptor
provides a very early means to alter or reject Messages, even before any Unit of Work is created.
- Since:
- 2.0
- Author:
- Allard Buijze
-
Method Summary
-
Method Details
-
handle
Invoked each time a message is about to be dispatched. The givenmessagerepresents the message being dispatched.- Parameters:
message- The message intended to be dispatched- Returns:
- the message to dispatch
-
handle
Apply this interceptor to the given list ofmessages. This method returns a function that can be invoked to obtain a modified version of messages at each position in the list.- Parameters:
messages- The Messages to pre-process- Returns:
- a function that processes messages based on their position in the list
-