Spring Integration

org.springframework.integration.xmpp.config
Class XmppConnectionFactoryBean

java.lang.Object
  extended by org.springframework.beans.factory.config.AbstractFactoryBean<org.jivesoftware.smack.XMPPConnection>
      extended by org.springframework.integration.xmpp.config.XmppConnectionFactoryBean
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean<org.jivesoftware.smack.XMPPConnection>, org.springframework.beans.factory.InitializingBean, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle

public class XmppConnectionFactoryBean
extends org.springframework.beans.factory.config.AbstractFactoryBean<org.jivesoftware.smack.XMPPConnection>
implements org.springframework.context.SmartLifecycle

This class configures an XMPPConnection object. This object is used for all scenarios to talk to a Smack server.

Since:
2.0
Author:
Josh Long, Mark Fisher, Oleg Zhurakousky
See Also:
XMPPConnection

Field Summary
 
Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
logger
 
Constructor Summary
XmppConnectionFactoryBean(org.jivesoftware.smack.ConnectionConfiguration connectionConfiguration)
           
 
Method Summary
protected  org.jivesoftware.smack.XMPPConnection createInstance()
           
 java.lang.Class<? extends org.jivesoftware.smack.XMPPConnection> getObjectType()
           
 int getPhase()
           
 boolean isAutoStartup()
           
 boolean isRunning()
           
 void setAutoStartup(boolean autoStartup)
           
 void setPassword(java.lang.String password)
           
 void setResource(java.lang.String resource)
           
 void setSubscriptionMode(java.lang.String subscriptionMode)
           
 void setUser(java.lang.String user)
           
 void start()
           
 void stop()
           
 void stop(java.lang.Runnable callback)
           
 
Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
afterPropertiesSet, destroy, destroyInstance, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmppConnectionFactoryBean

public XmppConnectionFactoryBean(org.jivesoftware.smack.ConnectionConfiguration connectionConfiguration)
Method Detail

setAutoStartup

public void setAutoStartup(boolean autoStartup)

setSubscriptionMode

public void setSubscriptionMode(java.lang.String subscriptionMode)

setUser

public void setUser(java.lang.String user)

setPassword

public void setPassword(java.lang.String password)

setResource

public void setResource(java.lang.String resource)

getObjectType

public java.lang.Class<? extends org.jivesoftware.smack.XMPPConnection> getObjectType()
Specified by:
getObjectType in interface org.springframework.beans.factory.FactoryBean<org.jivesoftware.smack.XMPPConnection>
Specified by:
getObjectType in class org.springframework.beans.factory.config.AbstractFactoryBean<org.jivesoftware.smack.XMPPConnection>

createInstance

protected org.jivesoftware.smack.XMPPConnection createInstance()
                                                        throws java.lang.Exception
Specified by:
createInstance in class org.springframework.beans.factory.config.AbstractFactoryBean<org.jivesoftware.smack.XMPPConnection>
Throws:
java.lang.Exception

start

public void start()
Specified by:
start in interface org.springframework.context.Lifecycle

stop

public void stop()
Specified by:
stop in interface org.springframework.context.Lifecycle

stop

public void stop(java.lang.Runnable callback)
Specified by:
stop in interface org.springframework.context.SmartLifecycle

isRunning

public boolean isRunning()
Specified by:
isRunning in interface org.springframework.context.Lifecycle

getPhase

public int getPhase()
Specified by:
getPhase in interface org.springframework.context.Phased

isAutoStartup

public boolean isAutoStartup()
Specified by:
isAutoStartup in interface org.springframework.context.SmartLifecycle

Spring Integration