mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-09-10 10:49:41 +02:00
s/XMPPConnection/TCPConnection
This commit is contained in:
parent
07649cc758
commit
84a3fd7bd9
25 changed files with 114 additions and 114 deletions
|
@ -45,7 +45,7 @@ public class CompressionTest extends SmackTestCase {
|
|||
config.setCompressionEnabled(true);
|
||||
config.setSASLAuthenticationEnabled(true);
|
||||
|
||||
XMPPConnection connection = new XMPPConnection(config);
|
||||
TCPConnection 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();
|
||||
XMPPConnection setupConnection = new XMPPConnection(getServiceName());
|
||||
TCPConnection 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();
|
||||
XMPPConnection setupConnection = createConnection();
|
||||
TCPConnection setupConnection = createConnection();
|
||||
setupConnection.connect();
|
||||
setupConnection.login("user0", "user0");
|
||||
// Delete the created account for the test
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
package org.jivesoftware.smackx;
|
||||
|
||||
import org.jivesoftware.smack.XMPPConnection;
|
||||
import org.jivesoftware.smack.TCPConnection;
|
||||
import org.jivesoftware.smack.XMPPException;
|
||||
import org.jivesoftware.smack.packet.Message;
|
||||
import org.jivesoftware.smack.test.SmackTestCase;
|
||||
|
@ -30,8 +30,8 @@ public class LastActivityManagerTest extends SmackTestCase {
|
|||
* answered and correct.
|
||||
*/
|
||||
public void testOnline() {
|
||||
XMPPConnection conn0 = getConnection(0);
|
||||
XMPPConnection conn1 = getConnection(1);
|
||||
TCPConnection conn0 = getConnection(0);
|
||||
TCPConnection conn1 = getConnection(1);
|
||||
|
||||
// Send a message as the last activity action from connection 1 to
|
||||
// connection 0
|
||||
|
@ -65,8 +65,8 @@ public class LastActivityManagerTest extends SmackTestCase {
|
|||
* This is a test to check if a denied LastActivity response is handled correctly.
|
||||
*/
|
||||
public void testOnlinePermisionDenied() {
|
||||
XMPPConnection conn0 = getConnection(0);
|
||||
XMPPConnection conn2 = getConnection(2);
|
||||
TCPConnection conn0 = getConnection(0);
|
||||
TCPConnection conn2 = getConnection(2);
|
||||
|
||||
// Send a message as the last activity action from connection 2 to
|
||||
// connection 0
|
||||
|
@ -95,7 +95,7 @@ public class LastActivityManagerTest extends SmackTestCase {
|
|||
* lapsed time is answered and correct
|
||||
*/
|
||||
public void testLastLoggedOut() {
|
||||
XMPPConnection conn0 = getConnection(0);
|
||||
TCPConnection conn0 = getConnection(0);
|
||||
|
||||
LastActivity lastActivity = null;
|
||||
try {
|
||||
|
@ -115,7 +115,7 @@ public class LastActivityManagerTest extends SmackTestCase {
|
|||
* is answered and correct
|
||||
*/
|
||||
public void testServerUptime() {
|
||||
XMPPConnection conn0 = getConnection(0);
|
||||
TCPConnection conn0 = getConnection(0);
|
||||
|
||||
LastActivity lastActivity = null;
|
||||
try {
|
||||
|
|
|
@ -2,7 +2,7 @@ package org.jivesoftware.smackx.entitycaps;
|
|||
|
||||
import org.jivesoftware.smack.PacketListener;
|
||||
import org.jivesoftware.smack.SmackConfiguration;
|
||||
import org.jivesoftware.smack.XMPPConnection;
|
||||
import org.jivesoftware.smack.TCPConnection;
|
||||
import org.jivesoftware.smack.XMPPException;
|
||||
import org.jivesoftware.smack.filter.AndFilter;
|
||||
import org.jivesoftware.smack.filter.PacketTypeFilter;
|
||||
|
@ -17,8 +17,8 @@ public class EntityCapsTest extends SmackTestCase {
|
|||
|
||||
private static final String DISCOVER_TEST_FEATURE = "entityCapsTest";
|
||||
|
||||
XMPPConnection con0;
|
||||
XMPPConnection con1;
|
||||
TCPConnection con0;
|
||||
TCPConnection con1;
|
||||
EntityCapsManager ecm0;
|
||||
EntityCapsManager ecm1;
|
||||
ServiceDiscoveryManager sdm0;
|
||||
|
|
|
@ -31,7 +31,7 @@ import org.jivesoftware.smack.Connection;
|
|||
import org.jivesoftware.smack.ConnectionConfiguration;
|
||||
import org.jivesoftware.smack.PacketCollector;
|
||||
import org.jivesoftware.smack.SmackConfiguration;
|
||||
import org.jivesoftware.smack.XMPPConnection;
|
||||
import org.jivesoftware.smack.TCPConnection;
|
||||
import org.jivesoftware.smack.XMPPException;
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.packet.Message;
|
||||
|
@ -224,7 +224,7 @@ public class MultiUserChatTest extends SmackTestCase {
|
|||
// Anonymous user joins the new room
|
||||
ConnectionConfiguration connectionConfiguration =
|
||||
new ConnectionConfiguration(getHost(), getPort(), getServiceName());
|
||||
XMPPConnection anonConnection = new XMPPConnection(connectionConfiguration);
|
||||
TCPConnection 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
|
||||
XMPPConnection[] conns = new XMPPConnection[5];
|
||||
TCPConnection[] 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 XMPPConnection(connectionConfiguration);
|
||||
conns[i] = new TCPConnection(connectionConfiguration);
|
||||
conns[i].connect();
|
||||
conns[i].login(getUsername(1), getPassword(1), "resource-" + i);
|
||||
Thread.sleep(20);
|
||||
|
@ -1843,7 +1843,7 @@ public class MultiUserChatTest extends SmackTestCase {
|
|||
}
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
//XMPPConnection.DEBUG_ENABLED = false;
|
||||
//TCPConnection.DEBUG_ENABLED = false;
|
||||
super.setUp();
|
||||
room = "fruta124@" + getMUCDomain();
|
||||
try {
|
||||
|
|
|
@ -33,7 +33,7 @@ import java.util.List;
|
|||
* See the following code sample for saving Bookmarks:
|
||||
* <p/>
|
||||
* <pre>
|
||||
* Connection con = new XMPPConnection("jabber.org");
|
||||
* Connection con = new TCPConnection("jabber.org");
|
||||
* con.login("john", "doe");
|
||||
* Bookmarks bookmarks = new Bookmarks();
|
||||
* <p/>
|
||||
|
|
|
@ -54,7 +54,7 @@ import org.jivesoftware.smackx.iqlast.packet.LastActivity;
|
|||
* <p>
|
||||
*
|
||||
* <pre>
|
||||
* Connection con = new XMPPConnection("jabber.org");
|
||||
* Connection con = new TCPConnection("jabber.org");
|
||||
* con.login("john", "doe");
|
||||
* LastActivity activity = LastActivity.getLastActivity(con, "xray@jabber.org/Smack");
|
||||
* </pre>
|
||||
|
|
|
@ -34,7 +34,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>
|
||||
* Connection con = new XMPPConnection("jabber.org");
|
||||
* Connection con = new TCPConnection("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