public class XmppConnectionFactoryBean extends Object implements org.springframework.beans.factory.FactoryBean<org.jivesoftware.smack.XMPPConnection>, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
XMPPConnection
and perform connection and login on the XMPP serverConstructor and Description |
---|
XmppConnectionFactoryBean() |
Modifier and Type | Method and Description |
---|---|
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) |
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
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
org.jivesoftware.smack.XMPPException
public void destroy()
destroy
in interface org.springframework.beans.factory.DisposableBean
public org.jivesoftware.smack.XMPPConnection getObject()
getObject
in interface org.springframework.beans.factory.FactoryBean<org.jivesoftware.smack.XMPPConnection>
public Class<org.jivesoftware.smack.XMPPConnection> getObjectType()
getObjectType
in interface org.springframework.beans.factory.FactoryBean<org.jivesoftware.smack.XMPPConnection>
public boolean isSingleton()
isSingleton
in interface org.springframework.beans.factory.FactoryBean<org.jivesoftware.smack.XMPPConnection>
protected org.jivesoftware.smack.ConnectionConfiguration 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