Class MessageHandlerConfigurer
java.lang.Object
org.axonframework.extension.spring.config.MessageHandlerConfigurer
- All Implemented Interfaces:
ConfigurationEnhancer,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
@Internal
public class MessageHandlerConfigurer
extends Object
implements ConfigurationEnhancer, org.springframework.context.ApplicationContextAware
An implementation of a
ConfigurationEnhancer 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 TypeMethodDescriptionvoidenhance(ComponentRegistry registry) 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.common.configuration.ConfigurationEnhancer
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
-
enhance
Description copied from interface:ConfigurationEnhancer- Specified by:
enhancein interfaceConfigurationEnhancer- Parameters:
registry- The registry instance to enhance.
-
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
-