Class XmppMessageSender
java.lang.Object
org.springframework.ws.transport.AbstractWebServiceMessageSender<XmppDestinationDescriptor>
org.springframework.ws.transport.xmpp.XmppMessageSender
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean, WebServiceMessageSender
public class XmppMessageSender
extends AbstractWebServiceMessageSender<XmppDestinationDescriptor>
implements org.springframework.beans.factory.InitializingBean
WebServiceMessageSender implementation that uses XMPP
Messages. Requires a
connectionto be set.
This message sender supports URI's of the following format:
xmpp:toThe to represents a Jabber ID.
Any xmpp: URI supplied by the application is accepted. A URI supplied by a
remote peer, such as a WS-Addressing ReplyTo or
FaultTo address, is only accepted when a DestinationPolicy accepts it; without a policy, every remote destination is rejected.
Use XmppDestinationPolicies.allowedJabberIds(String...) to state the Jabber IDs
that remote destinations may target.
- Since:
- 2.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface WebServiceMessageSender
WebServiceMessageSender.DestinationDescriptor, WebServiceMessageSender.DestinationPolicy<D>, WebServiceMessageSender.UriSource -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDefault encoding used to read from and write toMessagemessages.static final longDefault timeout for receive operations: -1 indicates a blocking receive without timeout. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateConnection(URI uri) Create a newWebServiceConnectionto the specified URI.protected XmppDestinationDescriptorcreateDescriptor(URI uri, WebServiceMessageSender.UriSource uriSource) protected StringvoidsetConnection(org.jivesoftware.smack.XMPPConnection connection) Sets theXMPPConnection.voidsetMessageEncoding(String messageEncoding) Sets the encoding used to read fromMessageobject.voidsetReceiveTimeout(long receiveTimeout) Set the timeout to use for receive calls.Methods inherited from class AbstractWebServiceMessageSender
getDestinationPolicy, setDestinationPolicy, supports, supportsRemoteDestinationsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface WebServiceMessageSender
supports
-
Field Details
-
DEFAULT_RECEIVE_TIMEOUT
public static final long DEFAULT_RECEIVE_TIMEOUTDefault timeout for receive operations: -1 indicates a blocking receive without timeout.- See Also:
-
DEFAULT_MESSAGE_ENCODING
Default encoding used to read from and write toMessagemessages.- See Also:
-
-
Constructor Details
-
XmppMessageSender
public XmppMessageSender()
-
-
Method Details
-
setConnection
public void setConnection(org.jivesoftware.smack.XMPPConnection connection) Sets theXMPPConnection. Setting this property is required. -
setReceiveTimeout
public void setReceiveTimeout(long receiveTimeout) Set the timeout to use for receive calls. The default is -1, which means no timeout.- See Also:
-
setMessageEncoding
Sets the encoding used to read fromMessageobject. Defaults toUTF-8. -
afterPropertiesSet
-
createConnection
Description copied from interface:WebServiceMessageSenderCreate a newWebServiceConnectionto the specified URI.- Specified by:
createConnectionin interfaceWebServiceMessageSender- Parameters:
uri- the URI to open a connection to- Returns:
- the new connection
- Throws:
IOException- in case of I/O errors
-
createDescriptor
protected XmppDestinationDescriptor createDescriptor(URI uri, WebServiceMessageSender.UriSource uriSource) Description copied from class:AbstractWebServiceMessageSender- Specified by:
createDescriptorin classAbstractWebServiceMessageSender<XmppDestinationDescriptor>- Parameters:
uri- the URI to checkuriSource- the source of the URI- Returns:
- a suitable descriptor
-
createThread
-