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
  • Constructor Details

    • XmppConnectionFactoryBean

      public XmppConnectionFactoryBean()
  • Method Details

    • setHost

      public void setHost(String host)
      Sets the server host to connect to.
    • setPort

      public void setPort(int port)
      Sets the server port to connect to.

      Defaults to 5222.

    • setServiceName

      public void setServiceName(String serviceName)
      Sets the service name to connect to.
    • setUsername

      public void setUsername(String username)
    • setPassword

      public void setPassword(String password)
    • setResource

      public void setResource(String resource)
    • afterPropertiesSet

      public void afterPropertiesSet() throws org.jivesoftware.smack.XMPPException, IOException, org.jivesoftware.smack.SmackException
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      org.jivesoftware.smack.XMPPException
      IOException
      org.jivesoftware.smack.SmackException
    • destroy

      public void destroy()
      Specified by:
      destroy in interface org.springframework.beans.factory.DisposableBean
    • getObject

      public org.jivesoftware.smack.tcp.XMPPTCPConnection getObject()
      Specified by:
      getObject in interface org.springframework.beans.factory.FactoryBean<org.jivesoftware.smack.tcp.XMPPTCPConnection>
    • getObjectType

      public Class<org.jivesoftware.smack.tcp.XMPPTCPConnection> getObjectType()
      Specified by:
      getObjectType in interface org.springframework.beans.factory.FactoryBean<org.jivesoftware.smack.tcp.XMPPTCPConnection>
    • isSingleton

      public boolean isSingleton()
      Specified by:
      isSingleton in interface org.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 the ConnectionConfiguration from the given parameters.
      Parameters:
      host - the host to connect to
      port - the port to connect to
      serviceName - the name of the service to connect to. May be null
      Throws:
      org.jxmpp.stringprep.XmppStringprepException