Spring Web Services Framework

org.springframework.ws.transport.xmpp.support
Class XmppConnectionFactoryBean

java.lang.Object
  extended by org.springframework.ws.transport.xmpp.support.XmppConnectionFactoryBean
All Implemented Interfaces:
DisposableBean, FactoryBean<org.jivesoftware.smack.XMPPConnection>, InitializingBean

public class XmppConnectionFactoryBean
extends Object
implements FactoryBean<org.jivesoftware.smack.XMPPConnection>, InitializingBean, DisposableBean

Factory to make XMPPConnection and perform connection and login on the XMPP server

Since:
2.0
Author:
Gildas Cuisinier, Arjen Poutsma

Constructor Summary
XmppConnectionFactoryBean()
           
 
Method Summary
 void afterPropertiesSet()
           
protected  org.jivesoftware.smack.ConnectionConfiguration createConnectionConfiguration(String host, int port, String serviceName)
          Creates the ConnectionConfiguration from the given parameters.
 void destroy()
           
 org.jivesoftware.smack.XMPPConnection getObject()
           
 Class<org.jivesoftware.smack.XMPPConnection> getObjectType()
           
 boolean isSingleton()
           
 void setHost(String host)
          Sets the server host to connect to.
 void setPassword(String password)
           
 void setPort(int port)
          Sets the the server port to connect to.
 void setResource(String resource)
           
 void setServiceName(String serviceName)
          Sets the service name to connect to.
 void setUsername(String username)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmppConnectionFactoryBean

public XmppConnectionFactoryBean()
Method Detail

setHost

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


setPort

public void setPort(int port)
Sets the 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
Specified by:
afterPropertiesSet in interface InitializingBean
Throws:
org.jivesoftware.smack.XMPPException

destroy

public void destroy()
Specified by:
destroy in interface DisposableBean

getObject

public org.jivesoftware.smack.XMPPConnection getObject()
Specified by:
getObject in interface FactoryBean<org.jivesoftware.smack.XMPPConnection>

getObjectType

public Class<org.jivesoftware.smack.XMPPConnection> getObjectType()
Specified by:
getObjectType in interface FactoryBean<org.jivesoftware.smack.XMPPConnection>

isSingleton

public boolean isSingleton()
Specified by:
isSingleton in interface FactoryBean<org.jivesoftware.smack.XMPPConnection>

createConnectionConfiguration

protected org.jivesoftware.smack.ConnectionConfiguration createConnectionConfiguration(String host,
                                                                                       int port,
                                                                                       String serviceName)
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

Spring Web Services Framework

Copyright © 2005-2013 The Spring Web Services Framework. All Rights Reserved.