mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 17:49:38 +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:
parent
11a41e79ca
commit
127319a821
102 changed files with 1420 additions and 1194 deletions
|
@ -13,7 +13,7 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.pubsub;
|
||||
|
||||
import org.jivesoftware.smack.XMPPConnection;
|
||||
import org.jivesoftware.smack.Connection;
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
|
||||
/**
|
||||
|
@ -22,7 +22,7 @@ import org.jivesoftware.smack.packet.PacketExtension;
|
|||
*
|
||||
* Affiliations are retrieved from the {@link PubSubManager#getAffiliations()} method, which
|
||||
* gets affiliations for the calling user, based on the identity that is associated with
|
||||
* the {@link XMPPConnection}.
|
||||
* the {@link Connection}.
|
||||
*
|
||||
* @author Robin Collier
|
||||
*/
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.pubsub;
|
||||
|
||||
import org.jivesoftware.smack.XMPPConnection;
|
||||
import org.jivesoftware.smack.Connection;
|
||||
|
||||
public class CollectionNode extends Node
|
||||
{
|
||||
CollectionNode(XMPPConnection connection, String nodeId)
|
||||
CollectionNode(Connection connection, String nodeId)
|
||||
{
|
||||
super(connection, nodeId);
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ import java.util.ArrayList;
|
|||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import org.jivesoftware.smack.XMPPConnection;
|
||||
import org.jivesoftware.smack.Connection;
|
||||
import org.jivesoftware.smack.XMPPException;
|
||||
import org.jivesoftware.smack.packet.IQ.Type;
|
||||
import org.jivesoftware.smackx.packet.DiscoverItems;
|
||||
|
@ -34,7 +34,7 @@ import org.jivesoftware.smackx.pubsub.packet.SyncPacketSend;
|
|||
*/
|
||||
public class LeafNode extends Node
|
||||
{
|
||||
LeafNode(XMPPConnection connection, String nodeName)
|
||||
LeafNode(Connection connection, String nodeName)
|
||||
{
|
||||
super(connection, nodeName);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ import java.util.List;
|
|||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.jivesoftware.smack.PacketListener;
|
||||
import org.jivesoftware.smack.XMPPConnection;
|
||||
import org.jivesoftware.smack.Connection;
|
||||
import org.jivesoftware.smack.XMPPException;
|
||||
import org.jivesoftware.smack.filter.OrFilter;
|
||||
import org.jivesoftware.smack.filter.PacketFilter;
|
||||
|
@ -33,7 +33,7 @@ import org.jivesoftware.smackx.pubsub.util.NodeUtils;
|
|||
|
||||
abstract public class Node
|
||||
{
|
||||
protected XMPPConnection con;
|
||||
protected Connection con;
|
||||
protected String id;
|
||||
protected String to;
|
||||
|
||||
|
@ -48,7 +48,7 @@ abstract public class Node
|
|||
* @param connection The connection the node is associated with
|
||||
* @param nodeName The node id
|
||||
*/
|
||||
Node(XMPPConnection connection, String nodeName)
|
||||
Node(Connection connection, String nodeName)
|
||||
{
|
||||
con = connection;
|
||||
id = nodeName;
|
||||
|
|
|
@ -17,7 +17,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.jivesoftware.smack.XMPPConnection;
|
||||
import org.jivesoftware.smack.Connection;
|
||||
import org.jivesoftware.smack.XMPPException;
|
||||
import org.jivesoftware.smack.packet.Packet;
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
|
@ -43,7 +43,7 @@ import org.jivesoftware.smackx.pubsub.util.NodeUtils;
|
|||
*/
|
||||
final public class PubSubManager
|
||||
{
|
||||
private XMPPConnection con;
|
||||
private Connection con;
|
||||
private String to;
|
||||
private Map<String, Node> nodeMap = new ConcurrentHashMap<String, Node>();
|
||||
|
||||
|
@ -52,7 +52,7 @@ final public class PubSubManager
|
|||
*
|
||||
* @param connection The XMPP connection
|
||||
*/
|
||||
public PubSubManager(XMPPConnection connection)
|
||||
public PubSubManager(Connection connection)
|
||||
{
|
||||
con = connection;
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ final public class PubSubManager
|
|||
* @param connection The XMPP connection
|
||||
* @param toAddress The pubsub specific to address (required for some servers)
|
||||
*/
|
||||
public PubSubManager(XMPPConnection connection, String toAddress)
|
||||
public PubSubManager(Connection connection, String toAddress)
|
||||
{
|
||||
con = connection;
|
||||
to = toAddress;
|
||||
|
@ -300,25 +300,25 @@ final public class PubSubManager
|
|||
return request;
|
||||
}
|
||||
|
||||
static Packet sendPubsubPacket(XMPPConnection con, String to, Type type, PacketExtension ext)
|
||||
static Packet sendPubsubPacket(Connection con, String to, Type type, PacketExtension ext)
|
||||
throws XMPPException
|
||||
{
|
||||
return sendPubsubPacket(con, to, type, ext, null);
|
||||
}
|
||||
|
||||
static Packet sendPubsubPacket(XMPPConnection con, String to, Type type, PacketExtension ext, PubSubNamespace ns)
|
||||
static Packet sendPubsubPacket(Connection con, String to, Type type, PacketExtension ext, PubSubNamespace ns)
|
||||
throws XMPPException
|
||||
{
|
||||
return SyncPacketSend.getReply(con, createPubsubPacket(to, type, ext, ns));
|
||||
}
|
||||
|
||||
static Packet sendPubsubPacket(XMPPConnection con, String to, Type type, PubSub packet)
|
||||
static Packet sendPubsubPacket(Connection con, String to, Type type, PubSub packet)
|
||||
throws XMPPException
|
||||
{
|
||||
return sendPubsubPacket(con, to, type, packet, null);
|
||||
}
|
||||
|
||||
static Packet sendPubsubPacket(XMPPConnection con, String to, Type type, PubSub packet, PubSubNamespace ns)
|
||||
static Packet sendPubsubPacket(Connection con, String to, Type type, PubSub packet, PubSubNamespace ns)
|
||||
throws XMPPException
|
||||
{
|
||||
return SyncPacketSend.getReply(con, packet);
|
||||
|
|
|
@ -15,7 +15,7 @@ package org.jivesoftware.smackx.pubsub.packet;
|
|||
|
||||
import org.jivesoftware.smack.PacketCollector;
|
||||
import org.jivesoftware.smack.SmackConfiguration;
|
||||
import org.jivesoftware.smack.XMPPConnection;
|
||||
import org.jivesoftware.smack.Connection;
|
||||
import org.jivesoftware.smack.XMPPException;
|
||||
import org.jivesoftware.smack.filter.PacketFilter;
|
||||
import org.jivesoftware.smack.filter.PacketIDFilter;
|
||||
|
@ -32,7 +32,7 @@ final public class SyncPacketSend
|
|||
private SyncPacketSend()
|
||||
{ }
|
||||
|
||||
static public Packet getReply(XMPPConnection connection, Packet packet, long timeout)
|
||||
static public Packet getReply(Connection connection, Packet packet, long timeout)
|
||||
throws XMPPException
|
||||
{
|
||||
PacketFilter responseFilter = new PacketIDFilter(packet.getPacketID());
|
||||
|
@ -55,7 +55,7 @@ final public class SyncPacketSend
|
|||
return result;
|
||||
}
|
||||
|
||||
static public Packet getReply(XMPPConnection connection, Packet packet)
|
||||
static public Packet getReply(Connection connection, Packet packet)
|
||||
throws XMPPException
|
||||
{
|
||||
return getReply(connection, packet, SmackConfiguration.getPacketReplyTimeout());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue