@AutoConfiguration @ConditionalOnClass(value=SpringConfigurer.class) @AutoConfigureAfter(value={AxonAutoConfiguration.class,JpaAutoConfiguration.class,JpaEventStoreAutoConfiguration.class,NoOpTransactionAutoConfiguration.class,TransactionAutoConfiguration.class}) public class InterceptorAutoConfiguration extends Object
MessageHandlerInterceptor
s and
MessageDispatchInterceptor
and registers them with the respective buses and gateways.
Note: This class use a hack approach! Because some gateways/buses (or custom interceptors provided by the framework user) need an axonConfiguration to initialize, the usual way of registering interceptors in the ConfigurerModule.onInitialize method does not work for them. This is due to a circular reference caused e.g. by JpaJavaxEventStoreAutoConfiguration. So we register them by injecting gateway/bus components in to the InitializingBean function and register the interceptors there.
Constructor and Description |
---|
InterceptorAutoConfiguration() |
Modifier and Type | Method and Description |
---|---|
org.springframework.beans.factory.InitializingBean |
commandDispatchInterceptorConfigurer(CommandGateway commandGateway,
Optional<List<MessageDispatchInterceptor<? super CommandMessage<?>>>> interceptors) |
org.springframework.beans.factory.InitializingBean |
commandHandlerInterceptorConfigurer(CommandBus commandBus,
Optional<List<MessageHandlerInterceptor<? super CommandMessage<?>>>> interceptors) |
org.springframework.beans.factory.InitializingBean |
eventDispatchInterceptorConfigurer(EventGateway eventGateway,
Optional<List<MessageDispatchInterceptor<? super EventMessage<?>>>> interceptors) |
org.springframework.beans.factory.InitializingBean |
messageHandlerInterceptorConfigurer(EventProcessingConfigurer eventProcessingConfigurer,
Optional<List<MessageHandlerInterceptor<? super EventMessage<?>>>> interceptors) |
org.springframework.beans.factory.InitializingBean |
queryDispatchInterceptorConfigurer(QueryGateway queryGateway,
Optional<List<MessageDispatchInterceptor<? super QueryMessage<?,?>>>> interceptors) |
org.springframework.beans.factory.InitializingBean |
queryHandlerInterceptorConfigurer(QueryBus queryBus,
Optional<List<MessageHandlerInterceptor<? super QueryMessage<?,?>>>> interceptors) |
@Bean @ConditionalOnBean(value=MessageDispatchInterceptor.class) public org.springframework.beans.factory.InitializingBean commandDispatchInterceptorConfigurer(CommandGateway commandGateway, Optional<List<MessageDispatchInterceptor<? super CommandMessage<?>>>> interceptors)
@Bean @ConditionalOnBean(value=MessageDispatchInterceptor.class) public org.springframework.beans.factory.InitializingBean eventDispatchInterceptorConfigurer(EventGateway eventGateway, Optional<List<MessageDispatchInterceptor<? super EventMessage<?>>>> interceptors)
@Bean @ConditionalOnBean(value=MessageDispatchInterceptor.class) public org.springframework.beans.factory.InitializingBean queryDispatchInterceptorConfigurer(QueryGateway queryGateway, Optional<List<MessageDispatchInterceptor<? super QueryMessage<?,?>>>> interceptors)
@Bean @ConditionalOnBean(value=MessageHandlerInterceptor.class) public org.springframework.beans.factory.InitializingBean commandHandlerInterceptorConfigurer(CommandBus commandBus, Optional<List<MessageHandlerInterceptor<? super CommandMessage<?>>>> interceptors)
@Bean @ConditionalOnBean(value=MessageHandlerInterceptor.class) public org.springframework.beans.factory.InitializingBean queryHandlerInterceptorConfigurer(QueryBus queryBus, Optional<List<MessageHandlerInterceptor<? super QueryMessage<?,?>>>> interceptors)
@Bean public org.springframework.beans.factory.InitializingBean messageHandlerInterceptorConfigurer(EventProcessingConfigurer eventProcessingConfigurer, Optional<List<MessageHandlerInterceptor<? super EventMessage<?>>>> interceptors)
Copyright © 2010–2025. All rights reserved.