mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-12-07 13:41:08 +01:00
Renamed ConnectionEstablishedListener to ConnectionCreationListener. SMACK-173
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@5388 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
03bb3c1d0a
commit
216971659a
7 changed files with 34 additions and 29 deletions
|
|
@ -75,8 +75,8 @@ public class LastActivityManager {
|
|||
|
||||
// Enable the LastActivity support on every established connection
|
||||
static {
|
||||
XMPPConnection.addConnectionEstablishedListener(new ConnectionEstablishedListener() {
|
||||
public void connectionEstablished(XMPPConnection connection) {
|
||||
XMPPConnection.addConnectionCreationListener(new ConnectionCreationListener() {
|
||||
public void connectionCreated(XMPPConnection connection) {
|
||||
new LastActivityManager(connection);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -59,8 +59,8 @@ public class ServiceDiscoveryManager {
|
|||
|
||||
// Create a new ServiceDiscoveryManager on every established connection
|
||||
static {
|
||||
XMPPConnection.addConnectionEstablishedListener(new ConnectionEstablishedListener() {
|
||||
public void connectionEstablished(XMPPConnection connection) {
|
||||
XMPPConnection.addConnectionCreationListener(new ConnectionCreationListener() {
|
||||
public void connectionCreated(XMPPConnection connection) {
|
||||
new ServiceDiscoveryManager(connection);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -20,11 +20,14 @@
|
|||
|
||||
package org.jivesoftware.smackx;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.jivesoftware.smack.*;
|
||||
import org.jivesoftware.smack.ConnectionCreationListener;
|
||||
import org.jivesoftware.smack.XMPPConnection;
|
||||
import org.jivesoftware.smack.XMPPException;
|
||||
import org.jivesoftware.smack.packet.Message;
|
||||
import org.jivesoftware.smackx.packet.*;
|
||||
import org.jivesoftware.smackx.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.packet.XHTMLExtension;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
/**
|
||||
* Manages XHTML formatted texts within messages. A XHTMLManager provides a high level access to
|
||||
|
|
@ -40,8 +43,8 @@ public class XHTMLManager {
|
|||
// Enable the XHTML support on every established connection
|
||||
// The ServiceDiscoveryManager class should have been already initialized
|
||||
static {
|
||||
XMPPConnection.addConnectionListener(new ConnectionEstablishedListener() {
|
||||
public void connectionEstablished(XMPPConnection connection) {
|
||||
XMPPConnection.addConnectionListener(new ConnectionCreationListener() {
|
||||
public void connectionCreated(XMPPConnection connection) {
|
||||
XHTMLManager.setServiceEnabled(connection, true);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -76,8 +76,8 @@ public class MultiUserChat {
|
|||
private List<PacketListener> connectionListeners = new ArrayList<PacketListener>();
|
||||
|
||||
static {
|
||||
XMPPConnection.addConnectionEstablishedListener(new ConnectionEstablishedListener() {
|
||||
public void connectionEstablished(final XMPPConnection connection) {
|
||||
XMPPConnection.addConnectionCreationListener(new ConnectionCreationListener() {
|
||||
public void connectionCreated(final XMPPConnection connection) {
|
||||
// Set on every established connection that this client supports the Multi-User
|
||||
// Chat protocol. This information will be used when another client tries to
|
||||
// discover whether this client supports MUC or not.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue