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

public Interface DestinationResolver

Known Direct Subinterfaces
org.springframework.jms.support.destination.CachingDestinationResolver
Known Direct Implementers
org.springframework.jms.support.destination.DynamicDestinationResolver, org.springframework.jms.support.destination.BeanFactoryDestinationResolver
Annotations
@FunctionalInterface
Imports
jakarta.jms.Destination, .JMSException, .Session, org.springframework.lang.Nullable

Strategy interface for resolving JMS destinations.

Used by org.springframework.jms.core.JmsTemplate for resolving destination names from simple Strings to actual Destination implementation instances.

The default DestinationResolver implementation used by org.springframework.jms.core.JmsTemplate instances is the DynamicDestinationResolver class. Consider using the JndiDestinationResolver for more advanced scenarios.

Author
Juergen Hoeller
Since
1.1
See Also
org.springframework.jms.core.JmsTemplate#setDestinationResolver, org.springframework.jms.support.destination.DynamicDestinationResolver, org.springframework.jms.support.destination.JndiDestinationResolver

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 (may be null if the resolver implementation is able to work without it)
session
,
String
the name of the destination
destinationName
,
boolean
true if the domain is pub-sub, false if P2P
pubSubDomain
)

Resolve the given destination name, either as located resource or as dynamic destination.

Method Detail

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

Resolve the given destination name, either as located resource or as dynamic destination.

Parameters
session:Session

the current JMS Session (may be null if the resolver implementation is able to work without it)

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)

Exceptions
JMSException:
if the JMS Session failed to resolve the destination
DestinationResolutionException:
in case of general destination resolution failure