Package org.axonframework.messaging
Interface MessageDispatchInterceptorSupport<T extends Message<?>>
- Type Parameters:
T- The type of Message the interceptor works with
- All Known Subinterfaces:
CommandBus,CommandGateway,DeadlineManager,EventBus,EventGateway,EventStore,QueryBus,QueryGateway,QueryUpdateEmitter
- All Known Implementing Classes:
AbstractDeadlineManager,AbstractEventBus,AbstractEventStore,AsynchronousCommandBus,AxonServerCommandBus,AxonServerEventStore,AxonServerQueryBus,DbSchedulerDeadlineManager,DefaultCommandGateway,DefaultEventGateway,DefaultQueryGateway,DisruptorCommandBus,DistributedCommandBus,EmbeddedEventStore,EmbeddedEventStore,JobRunrDeadlineManager,QuartzDeadlineManager,RecordingCommandBus,SimpleCommandBus,SimpleDeadlineManager,SimpleEventBus,SimpleQueryBus,SimpleQueryUpdateEmitter,StubDeadlineManager
public interface MessageDispatchInterceptorSupport<T extends Message<?>>
Interface marking components capable of registering Dispatch Interceptors. Generally, these are Messaging components
injected into the sending end of the communication.
Dispatch Interceptors are always invoked in the thread that dispatches the message to the messaging component. If a Unit of Work is active, it is not that of the dispatched message, but of the message that triggered this message to be published.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionregisterDispatchInterceptor(MessageDispatchInterceptor<? super T> dispatchInterceptor) Register the given DispatchInterceptor.
-
Method Details
-
registerDispatchInterceptor
Registration registerDispatchInterceptor(@Nonnull MessageDispatchInterceptor<? super T> dispatchInterceptor) Register the given DispatchInterceptor. After registration, the interceptor will be invoked for each Message dispatched on the messaging component that it was registered to.- Parameters:
dispatchInterceptor- The interceptor to register- Returns:
- A Registration, which may be used to deregister the interceptor.
-