类 BeanFactoryDestinationResolver
- java.lang.Object
- org.springframework.jms.support.destination.BeanFactoryDestinationResolver
- 所有已实现的接口:
Aware
,BeanFactoryAware
,DestinationResolver
public class BeanFactoryDestinationResolver extends Object implements DestinationResolver, BeanFactoryAware
DestinationResolver
implementation based on a SpringBeanFactory
.Will lookup Spring managed beans identified by bean name, expecting them to be of type
javax.jms.Destination
.- 从以下版本开始:
- 2.5
- 作者:
- Juergen Hoeller
- 另请参阅:
BeanFactory
构造器概要
构造器 构造器 说明 BeanFactoryDestinationResolver()
Create a new instance of theBeanFactoryDestinationResolver
class.BeanFactoryDestinationResolver(BeanFactory beanFactory)
Create a new instance of theBeanFactoryDestinationResolver
class.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 Destination
resolveDestinationName(Session session, String destinationName, boolean pubSubDomain)
Resolve the given destination name, either as located resource or as dynamic destination.void
setBeanFactory(BeanFactory beanFactory)
Callback that supplies the owning factory to a bean instance.
构造器详细资料
BeanFactoryDestinationResolver
public BeanFactoryDestinationResolver()
Create a new instance of theBeanFactoryDestinationResolver
class.The BeanFactory to access must be set via
setBeanFactory
.
BeanFactoryDestinationResolver
public BeanFactoryDestinationResolver(BeanFactory beanFactory)
Create a new instance of theBeanFactoryDestinationResolver
class.Use of this constructor is redundant if this object is being created by a Spring IoC container, as the supplied
BeanFactory
will be replaced by theBeanFactory
that creates it (c.f. theBeanFactoryAware
contract). So only use this constructor if you are using this class outside the context of a Spring IoC container.- 参数:
beanFactory
- the bean factory to be used to lookupDestinatiosn
方法详细资料
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
resolveDestinationName
public Destination resolveDestinationName(Session session, String destinationName, boolean pubSubDomain) throws JMSException
从接口复制的说明:DestinationResolver
Resolve the given destination name, either as located resource or as dynamic destination.- 指定者:
resolveDestinationName
在接口中DestinationResolver
- 参数:
session
- the current JMS Session (may benull
if the resolver implementation is able to work without it)destinationName
- the name of the destinationpubSubDomain
-true
if the domain is pub-sub,false
if P2P- 返回:
- the JMS destination (either a topic or a queue)
- 抛出:
JMSException
- if the JMS Session failed to resolve the destination