Class DynamicDestinationResolver

java.lang.Object
org.springframework.jms.support.destination.DynamicDestinationResolver
All Implemented Interfaces:
DestinationResolver
Direct Known Subclasses:
SimpleDestinationResolver

public class DynamicDestinationResolver extends Object implements DestinationResolver
A basic DestinationResolver implementation freshly resolving destination names as dynamic destinations against a given Session.
Since:
1.1
Author:
Juergen Hoeller
See Also:
  • Constructor Details

    • DynamicDestinationResolver

      public DynamicDestinationResolver()
  • Method Details

    • resolveDestinationName

      public jakarta.jms.Destination resolveDestinationName(@Nullable jakarta.jms.Session session, String destinationName, boolean pubSubDomain) throws jakarta.jms.JMSException
      Resolve the specified destination name as a dynamic destination.
      Specified by:
      resolveDestinationName in interface DestinationResolver
      Parameters:
      session - the current JMS Session
      destinationName - the name of the destination
      pubSubDomain - true if the domain is pub-sub, false if P2P
      Returns:
      the JMS destination (either a topic or a queue)
      Throws:
      jakarta.jms.JMSException - if resolution failed
      See Also:
    • resolveTopic

      protected jakarta.jms.Topic resolveTopic(jakarta.jms.Session session, String topicName) throws jakarta.jms.JMSException
      Resolve the given destination name to a Topic.
      Parameters:
      session - the current JMS Session
      topicName - the name of the desired Topic
      Returns:
      the JMS Topic
      Throws:
      jakarta.jms.JMSException - if resolution failed
      See Also:
      • Session.createTopic(String)
    • resolveQueue

      protected jakarta.jms.Queue resolveQueue(jakarta.jms.Session session, String queueName) throws jakarta.jms.JMSException
      Resolve the given destination name to a Queue.
      Parameters:
      session - the current JMS Session
      queueName - the name of the desired Queue
      Returns:
      the JMS Queue
      Throws:
      jakarta.jms.JMSException - if resolution failed
      See Also:
      • Session.createQueue(String)