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
  • Constructor Details

    • MessageHandlerConfigurer

      public MessageHandlerConfigurer(MessageHandlerConfigurer.Type type, List<String> beanRefs)
      Registers the beans identified in given beanRefs as the given type of handler with the Axon Configuration.
      Parameters:
      type - The type of handler to register the beans as.
      beanRefs - A list of bean identifiers to register.
  • Method Details

    • enhance

      public void enhance(@Nonnull ComponentRegistry registry)
      Description copied from interface: ConfigurationEnhancer
      Enhances the given registry with, for example, additional components and decorators.
      Specified by:
      enhance in interface ConfigurationEnhancer
      Parameters:
      registry - The registry instance to enhance.
    • setApplicationContext

      public void setApplicationContext(@Nonnull org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException