public class XmppConnectionFactoryBean extends Object implements org.springframework.beans.factory.FactoryBean<org.jivesoftware.smack.tcp.XMPPTCPConnection>, 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.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 org.springframework.beans.factory.InitializingBean
org.jivesoftware.smack.XMPPException
IOException
org.jivesoftware.smack.SmackException
public void destroy()
destroy
in interface org.springframework.beans.factory.DisposableBean
public org.jivesoftware.smack.tcp.XMPPTCPConnection getObject()
getObject
in interface org.springframework.beans.factory.FactoryBean<org.jivesoftware.smack.tcp.XMPPTCPConnection>
public Class<org.jivesoftware.smack.tcp.XMPPTCPConnection> getObjectType()
getObjectType
in interface org.springframework.beans.factory.FactoryBean<org.jivesoftware.smack.tcp.XMPPTCPConnection>
public boolean isSingleton()
isSingleton
in interface org.springframework.beans.factory.FactoryBean<org.jivesoftware.smack.tcp.XMPPTCPConnection>
protected org.jivesoftware.smack.tcp.XMPPTCPConnectionConfiguration createConnectionConfiguration(String host, int port, String serviceName) throws org.jxmpp.stringprep.XmppStringprepException
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
org.jxmpp.stringprep.XmppStringprepException
Copyright © 2018 Pivotal Software. All rights reserved.