mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-12-12 22:11:07 +01:00
Make XMPPConnection an interface
create AbstractXMPPConnection.
This commit is contained in:
parent
6dd180e9d3
commit
beecb8a675
33 changed files with 1264 additions and 1090 deletions
|
|
@ -34,6 +34,7 @@ import org.jivesoftware.smack.XMPPConnection;
|
|||
import org.jivesoftware.smack.ConnectionCreationListener;
|
||||
import org.jivesoftware.smack.Manager;
|
||||
import org.jivesoftware.smack.PacketListener;
|
||||
import org.jivesoftware.smack.XMPPConnectionRegistry;
|
||||
import org.jivesoftware.smack.XMPPException;
|
||||
import org.jivesoftware.smack.XMPPException.XMPPErrorException;
|
||||
import org.jivesoftware.smack.filter.AndFilter;
|
||||
|
|
@ -69,7 +70,7 @@ public class PingManager extends Manager {
|
|||
Pong.class), new IQTypeFilter(Type.RESULT));
|
||||
|
||||
static {
|
||||
XMPPConnection.addConnectionCreationListener(new ConnectionCreationListener() {
|
||||
XMPPConnectionRegistry.addConnectionCreationListener(new ConnectionCreationListener() {
|
||||
public void connectionCreated(XMPPConnection connection) {
|
||||
getInstanceFor(connection);
|
||||
}
|
||||
|
|
@ -308,7 +309,7 @@ public class PingManager extends Manager {
|
|||
int nextPingIn = pingInterval - delta;
|
||||
LOGGER.fine("Scheduling ServerPingTask in " + nextPingIn + " seconds (pingInterval="
|
||||
+ pingInterval + ", delta=" + delta + ")");
|
||||
nextAutomaticPing = schedule(pingServerRunnable, pingInterval, TimeUnit.SECONDS);
|
||||
nextAutomaticPing = connection().schedule(pingServerRunnable, pingInterval, TimeUnit.SECONDS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue