Add XMPPTCPConnection(CharSequence, String) constructor

This commit is contained in:
Florian Schmaus 2015-02-09 07:32:04 +01:00
parent 943dc29f92
commit 96e3d5c533
1 changed files with 15 additions and 0 deletions

View File

@ -280,6 +280,21 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
this.config = config;
}
/**
* Creates a new XMPP connection over TCP.
* <p>
* Note that {@code jid} must be the bare JID, e.g. "user@example.org". More fine-grained control over the
* connection settings is available using the {@link #XMPPTCPConnection(XMPPTCPConnectionConfiguration)}
* constructor.
* </p>
*
* @param jid the bare JID used by the client.
* @param password the password or authentication token.
*/
public XMPPTCPConnection(CharSequence jid, String password) {
this(XmppStringUtils.parseLocalpart(jid.toString()), password, XmppStringUtils.parseDomain(jid.toString()));
}
/**
* Creates a new XMPP connection over TCP.
* <p>