Class MessageHandlerLookup
java.lang.Object
org.axonframework.extension.spring.config.MessageHandlerLookup
- All Implemented Interfaces:
org.springframework.beans.factory.config.BeanFactoryPostProcessor,org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor
@Internal
public class MessageHandlerLookup
extends Object
implements org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor
A
BeanDefinitionRegistryPostProcessor implementation that detects beans with Axon Message handlers and
registers an MessageHandlerConfigurer to have these handlers registered in the Axon
Configuration.- Since:
- 4.6.0
- Author:
- Allard Buijze
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionmessageHandlerBeans(Class<? extends Message> messageType, org.springframework.beans.factory.config.ConfigurableListableBeanFactory registry) Returns a list of beans found in the givenregisterthat contain a handler for the givenmessageType.messageHandlerBeans(Class<? extends Message> messageType, org.springframework.beans.factory.config.ConfigurableListableBeanFactory registry, boolean includePrototypeBeans) Returns a list of beans found in the givenregisterthat contain a handler for the givenmessageType.voidpostProcessBeanDefinitionRegistry(org.springframework.beans.factory.support.BeanDefinitionRegistry registry) voidpostProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
-
Constructor Details
-
MessageHandlerLookup
public MessageHandlerLookup()
-
-
Method Details
-
messageHandlerBeans
public static List<String> messageHandlerBeans(Class<? extends Message> messageType, org.springframework.beans.factory.config.ConfigurableListableBeanFactory registry) Returns a list of beans found in the givenregisterthat contain a handler for the givenmessageType. The search will not consider prototype beans (or any other non-singleton or abstract bean definitions).- Parameters:
messageType- The type of message to find handlers for.registry- The registry to find these handlers in.- Returns:
- A list of bean names with message handlers.
-
messageHandlerBeans
public static List<String> messageHandlerBeans(Class<? extends Message> messageType, org.springframework.beans.factory.config.ConfigurableListableBeanFactory registry, boolean includePrototypeBeans) Returns a list of beans found in the givenregisterthat contain a handler for the givenmessageType. The search will only consider prototype beans (or any other non-singleton or abstract bean definitions) whenincludePrototypeBeansistrue.- Parameters:
messageType- The type of message to find handlers for.registry- The registry to find these handlers in.includePrototypeBeans- Whether to include prototype beans.- Returns:
- A list of bean names with message handlers.
-
postProcessBeanFactory
public void postProcessBeanFactory(@Nonnull org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) throws org.springframework.beans.BeansException - Specified by:
postProcessBeanFactoryin interfaceorg.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor- Specified by:
postProcessBeanFactoryin interfaceorg.springframework.beans.factory.config.BeanFactoryPostProcessor- Throws:
org.springframework.beans.BeansException
-
postProcessBeanDefinitionRegistry
public void postProcessBeanDefinitionRegistry(@Nonnull org.springframework.beans.factory.support.BeanDefinitionRegistry registry) throws org.springframework.beans.BeansException - Specified by:
postProcessBeanDefinitionRegistryin interfaceorg.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor- Throws:
org.springframework.beans.BeansException
-