mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 17:49:38 +02:00
Refactoring: All connection classes begin with XMPP now
This commit renames classes as follows: * TCPConnection --> XMPPTCPConnection * BOSHConnection --> XMPPBOSHConnection There are two reasons for this rename. First, it is there to indicate that the classes actually _are_ XMPP connections, using different transport mechanisms. Second, it makes auto-completion in IDEs easier, the developer can type XMPP<complete> and choose the right backend.
This commit is contained in:
parent
c86d6e3b61
commit
ab70cfec24
31 changed files with 120 additions and 120 deletions
|
@ -45,7 +45,7 @@ public class CompressionTest extends SmackTestCase {
|
|||
config.setCompressionEnabled(true);
|
||||
config.setSASLAuthenticationEnabled(true);
|
||||
|
||||
TCPConnection connection = new XMPPConnection(config);
|
||||
XMPPTCPConnection connection = new XMPPConnection(config);
|
||||
connection.connect();
|
||||
|
||||
// Login with the test account
|
||||
|
@ -84,7 +84,7 @@ public class CompressionTest extends SmackTestCase {
|
|||
*/
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
TCPConnection setupConnection = new XMPPConnection(getServiceName());
|
||||
XMPPTCPConnection setupConnection = new XMPPConnection(getServiceName());
|
||||
setupConnection.connect();
|
||||
if (!setupConnection.getAccountManager().supportsAccountCreation())
|
||||
fail("Server does not support account creation");
|
||||
|
@ -105,7 +105,7 @@ public class CompressionTest extends SmackTestCase {
|
|||
*/
|
||||
protected void tearDown() throws Exception {
|
||||
super.tearDown();
|
||||
TCPConnection setupConnection = createConnection();
|
||||
XMPPTCPConnection setupConnection = createConnection();
|
||||
setupConnection.connect();
|
||||
setupConnection.login("user0", "user0");
|
||||
// Delete the created account for the test
|
||||
|
|
|
@ -17,8 +17,8 @@ public class EntityCapsTest extends SmackTestCase {
|
|||
|
||||
private static final String DISCOVER_TEST_FEATURE = "entityCapsTest";
|
||||
|
||||
TCPConnection con0;
|
||||
TCPConnection con1;
|
||||
XMPPTCPConnection con0;
|
||||
XMPPTCPConnection con1;
|
||||
EntityCapsManager ecm0;
|
||||
EntityCapsManager ecm1;
|
||||
ServiceDiscoveryManager sdm0;
|
||||
|
|
|
@ -224,7 +224,7 @@ public class MultiUserChatTest extends SmackTestCase {
|
|||
// Anonymous user joins the new room
|
||||
ConnectionConfiguration connectionConfiguration =
|
||||
new ConnectionConfiguration(getHost(), getPort(), getServiceName());
|
||||
TCPConnection anonConnection = new XMPPConnection(connectionConfiguration);
|
||||
XMPPTCPConnection anonConnection = new XMPPConnection(connectionConfiguration);
|
||||
anonConnection.connect();
|
||||
anonConnection.loginAnonymously();
|
||||
MultiUserChat muc2 = new MultiUserChat(anonConnection, room);
|
||||
|
@ -1732,12 +1732,12 @@ public class MultiUserChatTest extends SmackTestCase {
|
|||
|
||||
public void testManyResources() throws Exception {
|
||||
// Create 5 more connections for user2
|
||||
TCPConnection[] conns = new XMPPConnection[5];
|
||||
XMPPTCPConnection[] conns = new XMPPConnection[5];
|
||||
for (int i = 0; i < conns.length; i++) {
|
||||
ConnectionConfiguration connectionConfiguration =
|
||||
new ConnectionConfiguration(getHost(), getPort(), getServiceName());
|
||||
connectionConfiguration.setSecurityMode(ConnectionConfiguration.SecurityMode.disabled);
|
||||
conns[i] = new TCPConnection(connectionConfiguration);
|
||||
conns[i] = new XMPPTCPConnection(connectionConfiguration);
|
||||
conns[i].connect();
|
||||
conns[i].login(getUsername(1), getPassword(1), "resource-" + i);
|
||||
Thread.sleep(20);
|
||||
|
|
|
@ -33,7 +33,7 @@ import java.util.List;
|
|||
* See the following code sample for saving Bookmarks:
|
||||
* <p/>
|
||||
* <pre>
|
||||
* XMPPConnection con = new TCPConnection("jabber.org");
|
||||
* XMPPConnection con = new XMPPTCPConnection("jabber.org");
|
||||
* con.login("john", "doe");
|
||||
* Bookmarks bookmarks = new Bookmarks();
|
||||
* <p/>
|
||||
|
|
|
@ -60,7 +60,7 @@ import org.jivesoftware.smackx.iqlast.packet.LastActivity;
|
|||
* <p>
|
||||
*
|
||||
* <pre>
|
||||
* XMPPConnection con = new TCPConnection("jabber.org");
|
||||
* XMPPConnection con = new XMPPTCPConnection("jabber.org");
|
||||
* con.login("john", "doe");
|
||||
* LastActivity activity = LastActivity.getLastActivity(con, "xray@jabber.org/Smack");
|
||||
* </pre>
|
||||
|
|
|
@ -36,7 +36,7 @@ import java.util.List;
|
|||
* searching (DataForms or No DataForms), but allows the user to simply use the DataForm model for both
|
||||
* types of support.
|
||||
* <pre>
|
||||
* XMPPConnection con = new TCPConnection("jabber.org");
|
||||
* XMPPConnection con = new XMPPTCPConnection("jabber.org");
|
||||
* con.login("john", "doe");
|
||||
* UserSearchManager search = new UserSearchManager(con, "users.jabber.org");
|
||||
* Form searchForm = search.getSearchForm();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue