Top Description Constructors Methods
org.springframework.jms.support.destination

public Class DynamicDestinationResolver

extends Object
implements DestinationResolver
Class Inheritance
All Implemented Interfaces
org.springframework.jms.support.destination.DestinationResolver
Imports
jakarta.jms.Destination, .JMSException, .Queue, .Session, .Topic, org.springframework.lang.Nullable, org.springframework.util.Assert

Simple DestinationResolver implementation resolving destination names as dynamic destinations.
Author
Juergen Hoeller
Since
1.1
See Also
jakarta.jms.Session#createQueue, jakarta.jms.Session#createTopic

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Destination

Returns:

the JMS destination (either a topic or a queue)
resolveDestinationName
(Session
the current JMS Session
session
,
String
the name of the destination
destinationName
,
boolean
true if the domain is pub-sub, false if P2P
pubSubDomain
)

Implements org.springframework.jms.support.destination.DestinationResolver.resolveDestinationName.

Resolve the specified destination name as a dynamic destination.

protected Queue

Returns:

the JMS Queue
resolveQueue
(Session
the current JMS Session
session
,
String
the name of the desired Queue
queueName
)

Resolve the given destination name to a Queue.

protected Topic

Returns:

the JMS Topic
resolveTopic
(Session
the current JMS Session
session
,
String
the name of the desired Topic
topicName
)

Resolve the given destination name to a Topic.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

DynamicDestinationResolverback to summary
public DynamicDestinationResolver()

Method Detail

resolveDestinationNameback to summary
public Destination resolveDestinationName(Session session, String destinationName, boolean pubSubDomain) throws JMSException

Implements org.springframework.jms.support.destination.DestinationResolver.resolveDestinationName.

Resolve the specified destination name as a dynamic destination.

Parameters
session:Session

the current JMS Session

destinationName:String

the name of the destination

pubSubDomain:boolean

true if the domain is pub-sub, false if P2P

Returns:Destination

the JMS destination (either a topic or a queue)

Annotations
@Override
Exceptions
JMSException:
if resolution failed
See Also
resolveTopic(jakarta.jms.Session, String), resolveQueue(jakarta.jms.Session, String)
resolveQueueback to summary
protected Queue resolveQueue(Session session, String queueName) throws JMSException

Resolve the given destination name to a Queue.

Parameters
session:Session

the current JMS Session

queueName:String

the name of the desired Queue

Returns:Queue

the JMS Queue

Exceptions
JMSException:
if resolution failed
See Also
Session#createQueue(String)
resolveTopicback to summary
protected Topic resolveTopic(Session session, String topicName) throws JMSException

Resolve the given destination name to a Topic.

Parameters
session:Session

the current JMS Session

topicName:String

the name of the desired Topic

Returns:Topic

the JMS Topic

Exceptions
JMSException:
if resolution failed
See Also
Session#createTopic(String)