org.springframework.jms.support.destination
Class DynamicDestinationResolver
java.lang.Object
org.springframework.jms.support.destination.DynamicDestinationResolver
- All Implemented Interfaces:
- DestinationResolver
- public class DynamicDestinationResolver
- extends 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 or 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)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DynamicDestinationResolver
public DynamicDestinationResolver()
resolveDestinationName
public Destination resolveDestinationName(Session session,
String destinationName,
boolean pubSubDomain)
throws 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:
JMSException
- if resolution failed
Copyright (C) 2003-2004 The Spring Framework Project.