Class BeanFactoryChannelResolver
java.lang.Object
org.springframework.integration.support.channel.BeanFactoryChannelResolver
- All Implemented Interfaces:
- Aware,- BeanFactoryAware,- DestinationResolver<MessageChannel>
public class BeanFactoryChannelResolver
extends Object
implements DestinationResolver<MessageChannel>, BeanFactoryAware
DestinationResolver implementation based on a Spring BeanFactory.
 Will lookup Spring managed beans identified by bean name,
 expecting them to be of type MessageChannel.
 Consults a HeaderChannelRegistry, if available, if the bean is not found.
- Author:
- Mark Fisher, Gary Russell, Artem Bilan, Christian Tzolov
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionCreate a new instance of theBeanFactoryChannelResolverclass.BeanFactoryChannelResolver(BeanFactory beanFactory) Create a new instance of theBeanFactoryChannelResolverclass.
- 
Method SummaryModifier and TypeMethodDescriptionresolveDestination(String name) voidsetBeanFactory(BeanFactory beanFactory) 
- 
Constructor Details- 
BeanFactoryChannelResolverpublic BeanFactoryChannelResolver()Create a new instance of theBeanFactoryChannelResolverclass.The BeanFactory to access must be set via setBeanFactory. This will happen automatically if this resolver is defined within an ApplicationContext thereby receiving the callback upon initialization.- See Also:
 
- 
BeanFactoryChannelResolverCreate a new instance of theBeanFactoryChannelResolverclass.Use of this constructor is redundant if this object is being created by a Spring IoC container as the supplied BeanFactorywill be replaced by theBeanFactorythat creates it (c.f. theBeanFactoryAwarecontract). So only use this constructor if you are instantiating this object explicitly rather than defining a bean.- Parameters:
- beanFactory- the bean factory to be used to lookup- MessageChannels.
 
 
- 
- 
Method Details- 
setBeanFactory- Specified by:
- setBeanFactoryin interface- BeanFactoryAware
 
- 
resolveDestination- Specified by:
- resolveDestinationin interface- DestinationResolver<MessageChannel>
 
 
-