mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-12-06 21:21:08 +01:00
Renamed Connection to XMPPConnection
This commit is contained in:
parent
f3e007bad5
commit
489816c61f
145 changed files with 639 additions and 641 deletions
|
|
@ -167,7 +167,7 @@ public class MessageTest extends SmackTestCase {
|
|||
// Send the first message
|
||||
getConnection(0).sendPacket(msg);
|
||||
// Check that the connection that sent the message is still connected
|
||||
assertTrue("Connection was closed", getConnection(0).isConnected());
|
||||
assertTrue("XMPPConnection was closed", getConnection(0).isConnected());
|
||||
// Check that the message was received
|
||||
Message rcv = (Message) collector.nextResult(1000);
|
||||
assertNotNull("No Message was received", rcv);
|
||||
|
|
@ -175,7 +175,7 @@ public class MessageTest extends SmackTestCase {
|
|||
// Send the second message
|
||||
getConnection(0).sendPacket(msg);
|
||||
// Check that the connection that sent the message is still connected
|
||||
assertTrue("Connection was closed", getConnection(0).isConnected());
|
||||
assertTrue("XMPPConnection was closed", getConnection(0).isConnected());
|
||||
// Check that the second message was received
|
||||
rcv = (Message) collector.nextResult(1000);
|
||||
assertNotNull("No Message was received", rcv);
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@ public class PresenceTest extends SmackTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Connection(0) will send messages to the bareJID of Connection(1) where the user of
|
||||
* Connection(1) has logged from two different places with different presence priorities.
|
||||
* XMPPConnection(0) will send messages to the bareJID of XMPPConnection(1) where the user of
|
||||
* XMPPConnection(1) has logged from two different places with different presence priorities.
|
||||
*/
|
||||
public void testMessageToHighestPriority() {
|
||||
TCPConnection conn = null;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package org.jivesoftware.smack.util;
|
||||
|
||||
import org.jivesoftware.smack.Connection;
|
||||
import org.jivesoftware.smack.XMPPConnection;
|
||||
import org.jivesoftware.smack.Roster;
|
||||
import org.jivesoftware.smack.XMPPException;
|
||||
|
||||
|
|
@ -8,7 +8,7 @@ public class ConnectionUtils {
|
|||
|
||||
private ConnectionUtils() {}
|
||||
|
||||
public static void becomeFriends(Connection con0, Connection con1) throws XMPPException {
|
||||
public static void becomeFriends(XMPPConnection con0, XMPPConnection con1) throws XMPPException {
|
||||
Roster r0 = con0.getRoster();
|
||||
Roster r1 = con1.getRoster();
|
||||
r0.setSubscriptionMode(Roster.SubscriptionMode.accept_all);
|
||||
|
|
@ -17,9 +17,9 @@ public class ConnectionUtils {
|
|||
r1.createEntry(con0.getUser(), "u1", null);
|
||||
}
|
||||
|
||||
public static void letsAllBeFriends(Connection[] connections) throws XMPPException {
|
||||
for (Connection c1 : connections) {
|
||||
for (Connection c2 : connections) {
|
||||
public static void letsAllBeFriends(XMPPConnection[] connections) throws XMPPException {
|
||||
for (XMPPConnection c1 : connections) {
|
||||
for (XMPPConnection c2 : connections) {
|
||||
if (c1 == c2)
|
||||
continue;
|
||||
becomeFriends(c1, c2);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue