|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.jms.support.destination.BeanFactoryDestinationResolver
public class BeanFactoryDestinationResolver
DestinationResolver
implementation based on a Spring BeanFactory
.
Will lookup Spring managed beans identified by bean name,
expecting them to be of type javax.jms.Destination
.
BeanFactory
Constructor Summary | |
---|---|
BeanFactoryDestinationResolver()
Create a new instance of the BeanFactoryDestinationResolver class. |
|
BeanFactoryDestinationResolver(BeanFactory beanFactory)
Create a new instance of the BeanFactoryDestinationResolver class. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BeanFactoryDestinationResolver()
BeanFactoryDestinationResolver
class.
The BeanFactory to access must be set via setBeanFactory
.
setBeanFactory(org.springframework.beans.factory.BeanFactory)
public BeanFactoryDestinationResolver(BeanFactory beanFactory)
BeanFactoryDestinationResolver
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 the BeanFactory
that creates it (c.f. the
BeanFactoryAware
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 lookup Destinatiosn
Method Detail |
---|
public void setBeanFactory(BeanFactory beanFactory)
BeanFactoryAware
Invoked after the population of normal bean properties
but before an initialization callback such as
InitializingBean.afterPropertiesSet()
or a custom init-method.
setBeanFactory
in interface BeanFactoryAware
beanFactory
- owning BeanFactory (never null
).
The bean can immediately call methods on the factory.BeanInitializationException
public Destination resolveDestinationName(Session session, String destinationName, boolean pubSubDomain) throws JMSException
DestinationResolver
resolveDestinationName
in interface DestinationResolver
session
- the current JMS Session
(may be null
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
JMSException
- if the JMS Session failed to resolve the destination
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |