Class XmppMessageSender
java.lang.Object
org.springframework.ws.transport.xmpp.XmppMessageSender
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
,WebServiceMessageSender
public class XmppMessageSender
extends Object
implements WebServiceMessageSender, org.springframework.beans.factory.InitializingBean
WebServiceMessageSender
implementation that uses XMPP Message
s.
Requires a connection
to 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
Modifier and TypeFieldDescriptionstatic final String
Default encoding used to read from and write toMessage
messages.static final long
Default timeout for receive operations: -1 indicates a blocking receive without timeout. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
createConnection
(URI uri) Create a newWebServiceConnection
to the specified URI.protected String
void
setConnection
(org.jivesoftware.smack.XMPPConnection connection) Sets theXMPPConnection
.void
setMessageEncoding
(String messageEncoding) Sets the encoding used to read fromMessage
object.void
setReceiveTimeout
(long receiveTimeout) Set the timeout to use for receive calls.boolean
Does thisWebServiceMessageSender
support the supplied URI?
-
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 toMessage
messages.- 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 fromMessage
object. Defaults toUTF-8
. -
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
-
createConnection
Description copied from interface:WebServiceMessageSender
Create a newWebServiceConnection
to the specified URI.- Specified by:
createConnection
in interfaceWebServiceMessageSender
- Parameters:
uri
- the URI to open a connection to- Returns:
- the new connection
- Throws:
IOException
- in case of I/O errors
-
supports
Description copied from interface:WebServiceMessageSender
Does thisWebServiceMessageSender
support the supplied URI?- Specified by:
supports
in interfaceWebServiceMessageSender
- Parameters:
uri
- the URI to be checked- Returns:
true
if thisWebServiceMessageSender
supports the supplied URI
-
createThread
-