Class SimpleDestinationResolver
java.lang.Object
org.springframework.jms.support.destination.DynamicDestinationResolver
org.springframework.jms.support.destination.SimpleDestinationResolver
- All Implemented Interfaces:
- CachingDestinationResolver, DestinationResolver
public class SimpleDestinationResolver
extends DynamicDestinationResolver
implements CachingDestinationResolver
A simple 
DestinationResolver implementation for Session-based
destination resolution, caching Queue and Topic instances per
queue/topic name. In that sense, the destinations themselves also need to be
"simple": not Session-specific and therefore stable across an entire JMS setup.
This is the default resolver used by JmsClient
and also JmsTemplate and listener containers,
as of 7.0. For enforcing fresh resolution on every call, you may explicitly set a
DynamicDestinationResolver instead.
- Since:
- 7.0
- Author:
- Juergen Hoeller
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidClear the entire destination cache.voidremoveFromCache(String destinationName) Remove the destination with the given name from the cache (if cached by this resolver in the first place).protected QueueresolveQueue(Session session, String queueName) Resolve the given destination name to aQueue.protected TopicresolveTopic(Session session, String topicName) Resolve the given destination name to aTopic.Methods inherited from class DynamicDestinationResolverresolveDestinationNameMethods inherited from class Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DestinationResolverresolveDestinationName
- 
Constructor Details- 
SimpleDestinationResolverpublic SimpleDestinationResolver()
 
- 
- 
Method Details- 
resolveTopicDescription copied from class:DynamicDestinationResolverResolve the given destination name to aTopic.- Overrides:
- resolveTopicin class- DynamicDestinationResolver
- Parameters:
- session- the current JMS Session
- topicName- the name of the desired- Topic
- Returns:
- the JMS Topic
- Throws:
- JMSException- if resolution failed
- See Also:
 
- 
resolveQueueDescription copied from class:DynamicDestinationResolverResolve the given destination name to aQueue.- Overrides:
- resolveQueuein class- DynamicDestinationResolver
- Parameters:
- session- the current JMS Session
- queueName- the name of the desired- Queue
- Returns:
- the JMS Queue
- Throws:
- JMSException- if resolution failed
- See Also:
 
- 
removeFromCacheDescription copied from interface:CachingDestinationResolverRemove the destination with the given name from the cache (if cached by this resolver in the first place).To be called if access to the specified destination failed, assuming that the JMS Destination object might have become invalid. - Specified by:
- removeFromCachein interface- CachingDestinationResolver
- Parameters:
- destinationName- the name of the destination
 
- 
clearCachepublic void clearCache()Description copied from interface:CachingDestinationResolverClear the entire destination cache.To be called in case of general JMS provider failure. - Specified by:
- clearCachein interface- CachingDestinationResolver
 
 
-