public class XmppConnectionFactoryBean extends AbstractFactoryBean<org.jivesoftware.smack.XMPPConnection> implements SmartLifecycle
XMPPTCPConnection
object.
This object is used for all scenarios to talk to a Smack server.XMPPTCPConnection
logger
DEFAULT_PHASE
OBJECT_TYPE_ATTRIBUTE
Constructor and Description |
---|
XmppConnectionFactoryBean() |
Modifier and Type | Method and Description |
---|---|
protected org.jivesoftware.smack.XMPPConnection |
createInstance() |
protected org.jivesoftware.smack.tcp.XMPPTCPConnection |
getConnection() |
Class<? extends org.jivesoftware.smack.XMPPConnection> |
getObjectType() |
int |
getPhase() |
boolean |
isAutoStartup() |
boolean |
isRunning() |
void |
setAutoStartup(boolean autoStartup) |
void |
setConnectionConfiguration(org.jivesoftware.smack.tcp.XMPPTCPConnectionConfiguration connectionConfiguration) |
void |
setHost(String host) |
void |
setPassword(String password) |
void |
setPhase(int phase) |
void |
setPort(int port) |
void |
setResource(String resource) |
void |
setServiceName(String serviceName) |
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.
|
void |
setUser(String user) |
void |
start() |
void |
stop() |
afterPropertiesSet, destroy, destroyInstance, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
stop
public void setConnectionConfiguration(org.jivesoftware.smack.tcp.XMPPTCPConnectionConfiguration connectionConfiguration)
connectionConfiguration
- the XMPPTCPConnectionConfiguration
to use.public void setAutoStartup(boolean autoStartup)
public void setPhase(int phase)
public void setUser(String user)
public void setPassword(String password)
public void setResource(String resource)
public void setServiceName(String serviceName)
public void setHost(String host)
public void setPort(int port)
public void setSubscriptionMode(org.jivesoftware.smack.roster.Roster.SubscriptionMode subscriptionMode)
Roster.SubscriptionMode#accept_all
.
To disable Roster subscription (e.g. for sub-protocol without its support such a GCM)
specify this option as null
.
subscriptionMode
- the Roster.SubscriptionMode
to use.
Can be null
.Roster.setSubscriptionMode(Roster.SubscriptionMode)
public Class<? extends org.jivesoftware.smack.XMPPConnection> getObjectType()
getObjectType
in interface FactoryBean<org.jivesoftware.smack.XMPPConnection>
getObjectType
in class AbstractFactoryBean<org.jivesoftware.smack.XMPPConnection>
protected org.jivesoftware.smack.XMPPConnection createInstance() throws org.jxmpp.stringprep.XmppStringprepException
createInstance
in class AbstractFactoryBean<org.jivesoftware.smack.XMPPConnection>
org.jxmpp.stringprep.XmppStringprepException
protected org.jivesoftware.smack.tcp.XMPPTCPConnection getConnection()
public int getPhase()
getPhase
in interface Phased
getPhase
in interface SmartLifecycle
public boolean isAutoStartup()
isAutoStartup
in interface SmartLifecycle