1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-09-13 04:09:41 +02:00

SMACK-279: The XMPPConnection extends the new abstract Connection class

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@11613 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Günther Niess 2010-02-09 11:55:56 +00:00 committed by niess
parent 11a41e79ca
commit 127319a821
102 changed files with 1420 additions and 1194 deletions

View file

@ -38,6 +38,11 @@ import java.io.File;
*/
public class ConnectionConfiguration implements Cloneable {
/**
* Hostname of the XMPP server. Usually servers use the same service name as the name
* of the server. However, there are some servers like google where host would be
* talk.google.com and the serviceName would be gmail.com.
*/
private String serviceName;
private String host;
@ -63,7 +68,7 @@ public class ConnectionConfiguration implements Cloneable {
*/
private CallbackHandler callbackHandler;
private boolean debuggerEnabled = XMPPConnection.DEBUG_ENABLED;
private boolean debuggerEnabled = Connection.DEBUG_ENABLED;
// Flag that indicates if a reconnection should be attempted when abruptly disconnected
private boolean reconnectionAllowed = true;
@ -80,7 +85,7 @@ public class ConnectionConfiguration implements Cloneable {
private SecurityMode securityMode = SecurityMode.enabled;
// Holds the proxy information (such as proxyhost, proxyport, username, password etc)
private ProxyInfo proxy;
protected ProxyInfo proxy;
/**
* Creates a new ConnectionConfiguration for the specified service name.
@ -175,7 +180,7 @@ public class ConnectionConfiguration implements Cloneable {
this.host = host;
this.port = port;
this.serviceName = serviceName;
this.proxy = proxy;
this.proxy = proxy;
// Build the default path to the cacert truststore file. By default we are
// going to use the file located in $JREHOME/lib/security/cacerts.
@ -197,6 +202,15 @@ public class ConnectionConfiguration implements Cloneable {
socketFactory = proxy.getSocketFactory();
}
/**
* Sets the server name, also known as XMPP domain of the target server.
*
* @param serviceName the XMPP domain of the target server.
*/
public void setServiceName(String serviceName) {
this.serviceName = serviceName;
}
/**
* Returns the server name of the target server.
*
@ -522,7 +536,7 @@ public class ConnectionConfiguration implements Cloneable {
/**
* Returns true if the new connection about to be establish is going to be debugged. By
* default the value of {@link XMPPConnection#DEBUG_ENABLED} is used.
* default the value of {@link Connection#DEBUG_ENABLED} is used.
*
* @return true if the new connection about to be establish is going to be debugged.
*/
@ -532,7 +546,7 @@ public class ConnectionConfiguration implements Cloneable {
/**
* Sets if the new connection about to be establish is going to be debugged. By
* default the value of {@link XMPPConnection#DEBUG_ENABLED} is used.
* default the value of {@link Connection#DEBUG_ENABLED} is used.
*
* @param debuggerEnabled if the new connection about to be establish is going to be debugged.
*/