Class XmppDestinationPolicies
java.lang.Object
org.springframework.ws.transport.xmpp.XmppDestinationPolicies
DestinationPolicy implementations for XMPP destinations.
A policy is required for a sender to accept a remote
destination, such as a WS-Addressing ReplyTo or FaultTo address:
XmppMessageSender sender = new XmppMessageSender();
sender.setConnection(connection);
sender.setDestinationPolicy(XmppDestinationPolicies.allowedJabberIds("[email protected]"));
- Since:
- 3.1.10
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallowedJabberIds(String... jabberIds) Return a policy that accepts a remote destination only if its Jabber ID is one of the given Jabber IDs, and accepts any application-supplied destination.allowedJabberIds(Collection<String> jabberIds) Return a policy that accepts a remote destination only if its Jabber ID is one of the given Jabber IDs, and accepts any application-supplied destination.
-
Constructor Details
-
XmppDestinationPolicies
public XmppDestinationPolicies()
-
-
Method Details
-
allowedJabberIds
public static WebServiceMessageSender.DestinationPolicy<XmppDestinationDescriptor> allowedJabberIds(String... jabberIds) Return a policy that accepts a remote destination only if its Jabber ID is one of the given Jabber IDs, and accepts any application-supplied destination.- Parameters:
jabberIds- the Jabber IDs to accept- Returns:
- a policy accepting only those Jabber IDs for remote destinations
- See Also:
-
allowedJabberIds
public static WebServiceMessageSender.DestinationPolicy<XmppDestinationDescriptor> allowedJabberIds(Collection<String> jabberIds) Return a policy that accepts a remote destination only if its Jabber ID is one of the given Jabber IDs, and accepts any application-supplied destination.A Jabber ID is compared exactly as the sender would hand it to the XMPP connection, without normalization of any part of it. A JID that differs in case, or that carries a resource where none is configured, therefore does not match. List every form that replies may target, and note that a bare JID is normally what a peer supplies as a reply address.
- Parameters:
jabberIds- the Jabber IDs to accept- Returns:
- a policy accepting only those Jabber IDs for remote destinations
- Throws:
IllegalArgumentException- if no Jabber ID is given, or one contains whitespace or a control character
-