1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-12-14 15:01:07 +01:00

Add and use AbstractConnectionClosedListener

This commit is contained in:
Florian Schmaus 2015-01-07 19:56:44 +01:00
parent b23c3226d2
commit 82eb9b18dd
7 changed files with 56 additions and 47 deletions

View file

@ -16,7 +16,7 @@
*/
package org.jivesoftware.smackx.caps;
import org.jivesoftware.smack.AbstractConnectionListener;
import org.jivesoftware.smack.AbstractConnectionClosedListener;
import org.jivesoftware.smack.SmackException.NoResponseException;
import org.jivesoftware.smack.SmackException.NotConnectedException;
import org.jivesoftware.smack.XMPPConnection;
@ -274,7 +274,7 @@ public class EntityCapsManager extends Manager {
this.sdm = ServiceDiscoveryManager.getInstanceFor(connection);
instances.put(connection, this);
connection.addConnectionListener(new AbstractConnectionListener() {
connection.addConnectionListener(new AbstractConnectionClosedListener() {
@Override
public void connected(XMPPConnection connection) {
// It's not clear when a server would report the caps stream
@ -290,11 +290,7 @@ public class EntityCapsManager extends Manager {
processCapsStreamFeatureIfAvailable(connection);
}
@Override
public void connectionClosed() {
presenceSend = false;
}
@Override
public void connectionClosedOnError(Exception e) {
public void connectionTerminated() {
presenceSend = false;
}