类 BeanFactoryMessageChannelDestinationResolver
- java.lang.Object
- org.springframework.messaging.core.BeanFactoryMessageChannelDestinationResolver
- 所有已实现的接口:
Aware
,BeanFactoryAware
,DestinationResolver<MessageChannel>
public class BeanFactoryMessageChannelDestinationResolver extends Object implements DestinationResolver<MessageChannel>, BeanFactoryAware
An implementation ofDestinationResolver
that interprets a destination name as the bean name of aMessageChannel
and looks up the bean in the configuredBeanFactory
.- 从以下版本开始:
- 4.0
- 作者:
- Mark Fisher
构造器概要
构造器 构造器 说明 BeanFactoryMessageChannelDestinationResolver()
A default constructor that can be used when the resolver itself is configured as a Spring bean and will have theBeanFactory
injected as a result of ing having implementedBeanFactoryAware
.BeanFactoryMessageChannelDestinationResolver(BeanFactory beanFactory)
A constructor that accepts aBeanFactory
useful if instantiating this resolver manually rather than having it defined as a Spring-managed bean.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 MessageChannel
resolveDestination(String name)
Resolve the given destination name.void
setBeanFactory(BeanFactory beanFactory)
Callback that supplies the owning factory to a bean instance.
构造器详细资料
BeanFactoryMessageChannelDestinationResolver
public BeanFactoryMessageChannelDestinationResolver()
A default constructor that can be used when the resolver itself is configured as a Spring bean and will have theBeanFactory
injected as a result of ing having implementedBeanFactoryAware
.
BeanFactoryMessageChannelDestinationResolver
public BeanFactoryMessageChannelDestinationResolver(BeanFactory beanFactory)
A constructor that accepts aBeanFactory
useful if instantiating this resolver manually rather than having it defined as a Spring-managed bean.- 参数:
beanFactory
- the bean factory to perform lookups against
方法详细资料
setBeanFactory
public void setBeanFactory(BeanFactory beanFactory)
从接口复制的说明:BeanFactoryAware
Callback that supplies the owning factory to a bean instance.Invoked after the population of normal bean properties but before an initialization callback such as
InitializingBean.afterPropertiesSet()
or a custom init-method.- 指定者:
setBeanFactory
在接口中BeanFactoryAware
- 参数:
beanFactory
- owning BeanFactory (nevernull
). The bean can immediately call methods on the factory.- 另请参阅:
BeanInitializationException
resolveDestination
public MessageChannel resolveDestination(String name)
从接口复制的说明:DestinationResolver
Resolve the given destination name.- 指定者:
resolveDestination
在接口中DestinationResolver<MessageChannel>
- 参数:
name
- the destination name to resolve- 返回:
- the resolved destination (never
null
)