1
0
Fork 0
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:
Günther Niess 2010-02-09 11:55:56 +00:00 committed by niess
parent 11a41e79ca
commit 127319a821
102 changed files with 1420 additions and 1194 deletions

View file

@ -43,9 +43,9 @@ import java.util.*;
public class PrivacyListManager {
// Keep the list of instances of this class.
private static Map<XMPPConnection, PrivacyListManager> instances = new Hashtable<XMPPConnection, PrivacyListManager>();
private static Map<Connection, PrivacyListManager> instances = new Hashtable<Connection, PrivacyListManager>();
private XMPPConnection connection;
private Connection connection;
private final List<PrivacyListListener> listeners = new ArrayList<PrivacyListListener>();
PacketFilter packetFilter = new AndFilter(new IQTypeFilter(IQ.Type.SET),
new PacketExtensionFilter("query", "jabber:iq:privacy"));
@ -54,8 +54,8 @@ public class PrivacyListManager {
// Create a new PrivacyListManager on every established connection. In the init()
// method of PrivacyListManager, we'll add a listener that will delete the
// instance when the connection is closed.
XMPPConnection.addConnectionCreationListener(new ConnectionCreationListener() {
public void connectionCreated(XMPPConnection connection) {
Connection.addConnectionCreationListener(new ConnectionCreationListener() {
public void connectionCreated(Connection connection) {
new PrivacyListManager(connection);
}
});
@ -67,7 +67,7 @@ public class PrivacyListManager {
*
* @param connection the XMPP connection.
*/
private PrivacyListManager(XMPPConnection connection) {
private PrivacyListManager(Connection connection) {
this.connection = connection;
this.init();
}
@ -155,12 +155,12 @@ public class PrivacyListManager {
}
/**
* Returns the PrivacyListManager instance associated with a given XMPPConnection.
* Returns the PrivacyListManager instance associated with a given Connection.
*
* @param connection the connection used to look for the proper PrivacyListManager.
* @return the PrivacyListManager associated with a given XMPPConnection.
* @return the PrivacyListManager associated with a given Connection.
*/
public static PrivacyListManager getInstanceFor(XMPPConnection connection) {
public static PrivacyListManager getInstanceFor(Connection connection) {
return instances.get(connection);
}