public class XmppConnectionFactoryBean extends Object implements FactoryBean<org.jivesoftware.smack.tcp.XMPPTCPConnection>, InitializingBean, DisposableBean
XMPPConnection and perform connection and login on the XMPP server| Constructor and Description |
|---|
XmppConnectionFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
protected org.jivesoftware.smack.tcp.XMPPTCPConnectionConfiguration |
createConnectionConfiguration(String host,
int port,
String serviceName)
Creates the
ConnectionConfiguration from the given parameters. |
void |
destroy() |
org.jivesoftware.smack.tcp.XMPPTCPConnection |
getObject() |
Class<org.jivesoftware.smack.tcp.XMPPTCPConnection> |
getObjectType() |
boolean |
isSingleton() |
void |
setHost(String host)
Sets the server host to connect to.
|
void |
setPassword(String password) |
void |
setPort(int port)
Sets 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) |
public void setHost(String host)
public void setPort(int port)
Defaults to 5222.
public void setServiceName(String serviceName)
public void setUsername(String username)
public void setPassword(String password)
public void setResource(String resource)
public void afterPropertiesSet()
throws org.jivesoftware.smack.XMPPException,
IOException,
org.jivesoftware.smack.SmackException
afterPropertiesSet in interface InitializingBeanorg.jivesoftware.smack.XMPPExceptionIOExceptionorg.jivesoftware.smack.SmackExceptionpublic void destroy()
destroy in interface DisposableBeanpublic org.jivesoftware.smack.tcp.XMPPTCPConnection getObject()
getObject in interface FactoryBean<org.jivesoftware.smack.tcp.XMPPTCPConnection>public Class<org.jivesoftware.smack.tcp.XMPPTCPConnection> getObjectType()
getObjectType in interface FactoryBean<org.jivesoftware.smack.tcp.XMPPTCPConnection>public boolean isSingleton()
isSingleton in interface FactoryBean<org.jivesoftware.smack.tcp.XMPPTCPConnection>protected org.jivesoftware.smack.tcp.XMPPTCPConnectionConfiguration createConnectionConfiguration(String host, int port, String serviceName)
ConnectionConfiguration from the given parameters.host - the host to connect toport - the port to connect toserviceName - the name of the service to connect to. May be null