Class XmppConnectionFactoryBean
java.lang.Object
org.springframework.ws.transport.xmpp.support.XmppConnectionFactoryBean
- All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.FactoryBean<org.jivesoftware.smack.tcp.XMPPTCPConnection>,org.springframework.beans.factory.InitializingBean
public class XmppConnectionFactoryBean
extends Object
implements org.springframework.beans.factory.FactoryBean<org.jivesoftware.smack.tcp.XMPPTCPConnection>, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
Factory to make
XMPPConnection and perform connection and login on the XMPP server- Since:
- 2.0
- Author:
- Gildas Cuisinier, Arjen Poutsma
-
Field Summary
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected org.jivesoftware.smack.tcp.XMPPTCPConnectionConfigurationcreateConnectionConfiguration(String host, int port, String serviceName) Creates theConnectionConfigurationfrom the given parameters.voiddestroy()org.jivesoftware.smack.tcp.XMPPTCPConnectionClass<org.jivesoftware.smack.tcp.XMPPTCPConnection>booleanvoidSets the server host to connect to.voidsetPassword(String password) voidsetPort(int port) Sets the server port to connect to.voidsetResource(String resource) voidsetServiceName(String serviceName) Sets the service name to connect to.voidsetUsername(String username)
-
Constructor Details
-
XmppConnectionFactoryBean
public XmppConnectionFactoryBean()
-
-
Method Details
-
setHost
Sets the server host to connect to. -
setPort
public void setPort(int port) Sets the server port to connect to.Defaults to
5222. -
setServiceName
Sets the service name to connect to. -
setUsername
-
setPassword
-
setResource
-
afterPropertiesSet
public void afterPropertiesSet() throws org.jivesoftware.smack.XMPPException, IOException, org.jivesoftware.smack.SmackException- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
org.jivesoftware.smack.XMPPExceptionIOExceptionorg.jivesoftware.smack.SmackException
-
destroy
public void destroy()- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean
-
getObject
public org.jivesoftware.smack.tcp.XMPPTCPConnection getObject()- Specified by:
getObjectin interfaceorg.springframework.beans.factory.FactoryBean<org.jivesoftware.smack.tcp.XMPPTCPConnection>
-
getObjectType
- Specified by:
getObjectTypein interfaceorg.springframework.beans.factory.FactoryBean<org.jivesoftware.smack.tcp.XMPPTCPConnection>
-
isSingleton
public boolean isSingleton()- Specified by:
isSingletonin interfaceorg.springframework.beans.factory.FactoryBean<org.jivesoftware.smack.tcp.XMPPTCPConnection>
-
createConnectionConfiguration
protected org.jivesoftware.smack.tcp.XMPPTCPConnectionConfiguration createConnectionConfiguration(String host, int port, String serviceName) throws org.jxmpp.stringprep.XmppStringprepException Creates theConnectionConfigurationfrom the given parameters.- Parameters:
host- the host to connect toport- the port to connect toserviceName- the name of the service to connect to. May benull- Throws:
org.jxmpp.stringprep.XmppStringprepException
-