Class JmsDestinationPolicies
java.lang.Object
org.springframework.ws.transport.jms.JmsDestinationPolicies
DestinationPolicy implementations for JMS destinations.
A policy is required for a sender to accept a remote
destination, such as a WS-Addressing ReplyTo or FaultTo address:
JmsMessageSender sender = new JmsMessageSender(connectionFactory);
sender.setDestinationPolicy(JmsDestinationPolicies.allowedDestinationNames("ReplyQueue"));
- Since:
- 3.1.10
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallowedDestinationNames(String... names) Return a policy that accepts a remote destination only if both its destination name and itsreplyToName, when present, match one of the given names, and accepts any application-supplied destination.allowedDestinationNames(Collection<String> names) Return a policy that accepts a remote destination only if both its destination name and itsreplyToName, when present, match one of the given names, and accepts any application-supplied destination.
-
Constructor Details
-
JmsDestinationPolicies
public JmsDestinationPolicies()
-
-
Method Details
-
allowedDestinationNames
public static WebServiceMessageSender.DestinationPolicy<JmsDestinationDescriptor> allowedDestinationNames(String... names) Return a policy that accepts a remote destination only if both its destination name and itsreplyToName, when present, match one of the given names, and accepts any application-supplied destination.Names are compared exactly, including case, as a JMS destination name is opaque and only the provider can declare two names equal. Both names are checked because the sender hands both to its destination resolver, which treats either as a lookup key when it resolves through JNDI.
- Parameters:
names- the destination names to accept- Returns:
- a policy accepting only those names for remote destinations
-
allowedDestinationNames
public static WebServiceMessageSender.DestinationPolicy<JmsDestinationDescriptor> allowedDestinationNames(Collection<String> names) Return a policy that accepts a remote destination only if both its destination name and itsreplyToName, when present, match one of the given names, and accepts any application-supplied destination.Names are compared exactly, including case, as a JMS destination name is opaque and only the provider can declare two names equal. Both names are checked because the sender hands both to its destination resolver, which treats either as a lookup key when it resolves through JNDI.
- Parameters:
names- the destination names to accept- Returns:
- a policy accepting only those names for remote destinations
-