org.springframework.jms.support.destination
Class DynamicDestinationResolver
java.lang.Object
org.springframework.jms.support.destination.DynamicDestinationResolver
- All Implemented Interfaces:
- DestinationResolver
- public class DynamicDestinationResolver
- extends java.lang.Object
- implements DestinationResolver
Simple implementation of the DestinationResolver interface,
resolving destination names as dynamic destinations.
This implementation will work on both JMS 1.1 and JMS 1.0.2,
because it uses the QueueSession respectively TopicSession methods
if possible, falling back to JMS 1.1's generic Session methods.
- Since:
- 1.1
- Author:
- Juergen Hoeller
- See Also:
QueueSession.createQueue(java.lang.String)
,
TopicSession.createTopic(java.lang.String)
,
Session.createQueue(java.lang.String)
,
Session.createTopic(java.lang.String)
Method Summary |
javax.jms.Destination |
resolveDestinationName(javax.jms.Session session,
java.lang.String destinationName,
boolean pubSubDomain)
Resolve the given destination name, either as located resource
or as dynamic destination. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DynamicDestinationResolver
public DynamicDestinationResolver()
resolveDestinationName
public javax.jms.Destination resolveDestinationName(javax.jms.Session session,
java.lang.String destinationName,
boolean pubSubDomain)
throws javax.jms.JMSException
- Description copied from interface:
DestinationResolver
- Resolve the given destination name, either as located resource
or as dynamic destination.
- Specified by:
resolveDestinationName
in interface DestinationResolver
- Parameters:
session
- the current JMS SessiondestinationName
- the name of the destinationpubSubDomain
- whether the domain is pub-sub, else P2P
- Returns:
- the JMS destination (either a topic or a queue)
- Throws:
javax.jms.JMSException
- if resolution failed
Copyright (C) 2003-2004 The Spring Framework Project.