Interface DestinationResolver
- All Known Subinterfaces:
CachingDestinationResolver
- All Known Implementing Classes:
BeanFactoryDestinationResolver, DynamicDestinationResolver, JndiDestinationResolver, SimpleDestinationResolver
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Strategy interface for resolving JMS destinations.
Used by JmsTemplate for resolving
destination names from simple Strings to actual
Destination implementation instances.
The default DestinationResolver implementation used by
JmsTemplate instances is the
SimpleDestinationResolver class. Consider using the
JndiDestinationResolver for more advanced scenarios.
- Since:
- 1.1
- Author:
- Juergen Hoeller
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionjakarta.jms.DestinationresolveDestinationName(@Nullable jakarta.jms.Session session, String destinationName, boolean pubSubDomain) Resolve the given destination name, either as located resource or as dynamic destination.
-
Method Details
-
resolveDestinationName
jakarta.jms.Destination resolveDestinationName(@Nullable jakarta.jms.Session session, String destinationName, boolean pubSubDomain) throws jakarta.jms.JMSException Resolve the given destination name, either as located resource or as dynamic destination.- Parameters:
session- the current JMS Session (may benullif the resolver implementation is able to work without it)destinationName- the name of the destinationpubSubDomain-trueif the domain is pub-sub,falseif P2P- Returns:
- the JMS destination (either a topic or a queue)
- Throws:
jakarta.jms.JMSException- if the JMS Session failed to resolve the destinationDestinationResolutionException- in case of general destination resolution failure
-