Class XmppMessageSender
java.lang.Object
org.springframework.ws.transport.xmpp.XmppMessageSender
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean,org.springframework.ws.transport.WebServiceMessageSender
public class XmppMessageSender
extends Object
implements org.springframework.ws.transport.WebServiceMessageSender, 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.
- Since:
- 2.0
- Author:
- Gildas Cuisinier, Arjen Poutsma
-
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 TypeMethodDescriptionvoidorg.springframework.ws.transport.WebServiceConnectioncreateConnection(URI uri) 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.boolean
-
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:
-
org.jivesoftware.smack.PacketCollector#nextResult(long)
-
setMessageEncoding
Sets the encoding used to read fromMessageobject. Defaults toUTF-8. -
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
createConnection
public org.springframework.ws.transport.WebServiceConnection createConnection(URI uri) throws IOException - Specified by:
createConnectionin interfaceorg.springframework.ws.transport.WebServiceMessageSender- Throws:
IOException
-
supports
- Specified by:
supportsin interfaceorg.springframework.ws.transport.WebServiceMessageSender
-
createThread
-