1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-09-10 18:59:41 +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

@ -47,8 +47,8 @@ import java.util.concurrent.ConcurrentHashMap;
* An AdHocCommandManager is responsible for keeping the list of available
* commands offered by a service and for processing commands requests.
*
* Pass in an XMPPConnection isntance to
* {@link #getAddHocCommandsManager(org.jivesoftware.smack.XMPPConnection)} in order to
* Pass in a Connection instance to
* {@link #getAddHocCommandsManager(org.jivesoftware.smack.Connection)} in order to
* get an instance of this class.
*
* @author Gabriel Guardincerri
@ -65,11 +65,11 @@ public class AdHocCommandManager {
private static final int SESSION_TIMEOUT = 2 * 60;
/**
* Map a XMPPConnection with it AdHocCommandManager. This map have a key-value
* Map a Connection with it AdHocCommandManager. This map have a key-value
* pair for every active connection.
*/
private static Map<XMPPConnection, AdHocCommandManager> instances =
new ConcurrentHashMap<XMPPConnection, AdHocCommandManager>();
private static Map<Connection, AdHocCommandManager> instances =
new ConcurrentHashMap<Connection, AdHocCommandManager>();
/**
* Register the listener for all the connection creations. When a new
@ -77,8 +77,8 @@ public class AdHocCommandManager {
* related to that connection.
*/
static {
XMPPConnection.addConnectionCreationListener(new ConnectionCreationListener() {
public void connectionCreated(XMPPConnection connection) {
Connection.addConnectionCreationListener(new ConnectionCreationListener() {
public void connectionCreated(Connection connection) {
new AdHocCommandManager(connection);
}
});
@ -91,7 +91,7 @@ public class AdHocCommandManager {
* @param connection the XMPP connection.
* @return the AdHocCommandManager associated with the connection.
*/
public static AdHocCommandManager getAddHocCommandsManager(XMPPConnection connection) {
public static AdHocCommandManager getAddHocCommandsManager(Connection connection) {
return instances.get(connection);
}
@ -101,9 +101,9 @@ public class AdHocCommandManager {
private Thread sessionsSweeper;
/**
* The XMPPConnection that this instances of AdHocCommandManager manages
* The Connection that this instances of AdHocCommandManager manages
*/
private XMPPConnection connection;
private Connection connection;
/**
* Map a command node with its AdHocCommandInfo. Note: Key=command node,
@ -120,7 +120,7 @@ public class AdHocCommandManager {
*/
private Map<String, LocalCommand> executingCommands = new ConcurrentHashMap<String, LocalCommand>();
private AdHocCommandManager(XMPPConnection connection) {
private AdHocCommandManager(Connection connection) {
super();
this.connection = connection;
init();