Class XmppConnectionFactoryBean
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<org.jivesoftware.smack.XMPPConnection>
org.springframework.integration.xmpp.config.XmppConnectionFactoryBean
- All Implemented Interfaces:
- Aware,- BeanClassLoaderAware,- BeanFactoryAware,- DisposableBean,- FactoryBean<org.jivesoftware.smack.XMPPConnection>,- InitializingBean,- Lifecycle,- Phased,- SmartLifecycle
public class XmppConnectionFactoryBean
extends AbstractFactoryBean<org.jivesoftware.smack.XMPPConnection>
implements SmartLifecycle
This class configures an 
XMPPTCPConnection object.
 This object is used for all scenarios to talk to a Smack server.- Since:
- 2.0
- Author:
- Josh Long, Mark Fisher, Oleg Zhurakousky, Florian Schmaus, Artem Bilan, Philipp Etschel, Gary Russell, Christian Tzolov
- See Also:
- 
Field SummaryFields inherited from class org.springframework.beans.factory.config.AbstractFactoryBeanloggerFields inherited from interface org.springframework.beans.factory.FactoryBeanOBJECT_TYPE_ATTRIBUTEFields inherited from interface org.springframework.context.SmartLifecycleDEFAULT_PHASE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected org.jivesoftware.smack.XMPPConnectionprotected org.jivesoftware.smack.tcp.XMPPTCPConnectionClass<? extends org.jivesoftware.smack.XMPPConnection> intgetPhase()booleanbooleanvoidsetAutoStartup(boolean autoStartup) voidsetConnectionConfiguration(org.jivesoftware.smack.tcp.XMPPTCPConnectionConfiguration connectionConfiguration) voidvoidsetPassword(String password) voidsetPhase(int phase) voidsetPort(int port) voidsetResource(String resource) voidsetServiceName(String serviceName) voidsetSubscriptionMode(org.jivesoftware.smack.roster.Roster.SubscriptionMode subscriptionMode) Sets the subscription processing mode, which dictates what action Smack will take when subscription requests from other users are made.voidvoidstart()voidstop()Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBeanafterPropertiesSet, destroy, destroyInstance, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingletonMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.SmartLifecyclestop
- 
Constructor Details- 
XmppConnectionFactoryBeanpublic XmppConnectionFactoryBean()
 
- 
- 
Method Details- 
setConnectionConfigurationpublic void setConnectionConfiguration(org.jivesoftware.smack.tcp.XMPPTCPConnectionConfiguration connectionConfiguration) - Parameters:
- connectionConfiguration- the- XMPPTCPConnectionConfigurationto use.
- Since:
- 4.2.5
 
- 
setAutoStartuppublic void setAutoStartup(boolean autoStartup) 
- 
setPhasepublic void setPhase(int phase) 
- 
setUser
- 
setPassword
- 
setResource
- 
setServiceName
- 
setHost
- 
setPortpublic void setPort(int port) 
- 
setSubscriptionModepublic void setSubscriptionMode(org.jivesoftware.smack.roster.Roster.SubscriptionMode subscriptionMode) Sets the subscription processing mode, which dictates what action Smack will take when subscription requests from other users are made. The default subscription mode isRoster.SubscriptionMode.accept_all.To disable Roster subscription (e.g. for sub-protocol without its support such a GCM) specify this option as null.- Parameters:
- subscriptionMode- the- Roster.SubscriptionModeto use. Can be- null.
- See Also:
 
- 
getObjectType- Specified by:
- getObjectTypein interface- FactoryBean<org.jivesoftware.smack.XMPPConnection>
- Specified by:
- getObjectTypein class- AbstractFactoryBean<org.jivesoftware.smack.XMPPConnection>
 
- 
createInstanceprotected org.jivesoftware.smack.XMPPConnection createInstance() throws org.jxmpp.stringprep.XmppStringprepException- Specified by:
- createInstancein class- AbstractFactoryBean<org.jivesoftware.smack.XMPPConnection>
- Throws:
- org.jxmpp.stringprep.XmppStringprepException
 
- 
getConnectionprotected org.jivesoftware.smack.tcp.XMPPTCPConnection getConnection()
- 
start
- 
stop
- 
isRunning
- 
getPhasepublic int getPhase()- Specified by:
- getPhasein interface- Phased
- Specified by:
- getPhasein interface- SmartLifecycle
 
- 
isAutoStartuppublic boolean isAutoStartup()- Specified by:
- isAutoStartupin interface- SmartLifecycle
 
 
-