Package org.axonframework.spring.config
Class MessageHandlerConfigurer
java.lang.Object
org.axonframework.spring.config.MessageHandlerConfigurer
- All Implemented Interfaces:
ConfigurerModule,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
public class MessageHandlerConfigurer
extends Object
implements ConfigurerModule, org.springframework.context.ApplicationContextAware
An implementation of a
ConfigurerModule that will register a list of beans as handlers for a specific type of
message.
The beans will be lazily resolved to avoid circular dependencies if any these beans relies on the Axon Configuration to be available in the Application Context.
Typically, an application context would have an instance of this class registered for each type of message to register.
- Since:
- 4.6.0
- Author:
- Allard Buijze
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration defining the auto configurable message handler types. -
Constructor Summary
ConstructorsConstructorDescriptionMessageHandlerConfigurer(MessageHandlerConfigurer.Type type, List<String> beanRefs) Registers the beans identified in givenbeanRefsas the giventypeof handler with the AxonConfiguration. -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigureModule(Configurer configurer) Configure this module to the given globalConfigurer.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.axonframework.config.ConfigurerModule
order
-
Constructor Details
-
MessageHandlerConfigurer
Registers the beans identified in givenbeanRefsas the giventypeof handler with the AxonConfiguration.- Parameters:
type- The type of handler to register the beans as.beanRefs- A list of bean identifiers to register.
-
-
Method Details
-
configureModule
Description copied from interface:ConfigurerModuleConfigure this module to the given globalConfigurer.- Specified by:
configureModulein interfaceConfigurerModule- Parameters:
configurer- aConfigurerinstance to configure this module with
-
setApplicationContext
public void setApplicationContext(@Nonnull org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-