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 `DestinationResolver` implementation resolving destination names as dynamic destinations.

Since:
  1.1
Author:
  Juergen Hoeller
See Also:
  `Session.createQueue(java.lang.String)`, `Session.createTopic(java.lang.String)`

### Constructor Summary

Constructors
Constructor and Description
`DynamicDestinationResolver()`

### Method Summary

All Methods Instance Methods Concrete Methods
`Destination` `resolveDestinationName(Session session, String destinationName, boolean pubSubDomain)` Resolve the specified destination name as a dynamic destination.
`protected Queue` `resolveQueue(Session session, String queueName)` Resolve the given destination name to a `Queue`.
`protected Topic` `resolveTopic(Session session, String topicName)` Resolve the given destination name to a `Topic`.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### DynamicDestinationResolver

    public DynamicDestinationResolver()

### Method Detail

#### resolveDestinationName

    public Destination resolveDestinationName(@Nullable
                                              Session session,
                                              String destinationName,
                                              boolean pubSubDomain)
                                       throws 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:
  `JMSException` - if resolution failed
See Also:
  `resolveTopic(javax.jms.Session, String)`, `resolveQueue(javax.jms.Session, String)`

#### resolveTopic

    protected Topic resolveTopic(Session session,
                                 String topicName)
                          throws 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:
  `JMSException` - if resolution failed
See Also:
  `Session.createTopic(String)`

#### resolveQueue

    protected Queue resolveQueue(Session session,
                                 String queueName)
                          throws 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:
  `JMSException` - if resolution failed
See Also:
  `Session.createQueue(String)`