1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-09 17:19:39 +02:00

Merge pull request #209 from fuentesj11/rename-deprecate-xmppconnection-methods

Rename and deprecate XMPPConnection methods
This commit is contained in:
Florian Schmaus 2018-03-28 12:11:32 +02:00 committed by GitHub
commit 5b9254aff5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 103 additions and 23 deletions

View file

@ -116,7 +116,7 @@ public final class ChatManager extends Manager {
}
}, INCOMING_MESSAGE_FILTER);
connection.addPacketInterceptor(new StanzaListener() {
connection.addStanzaInterceptor(new StanzaListener() {
@Override
public void processStanza(Stanza stanza) throws NotConnectedException, InterruptedException {
Message message = (Message) stanza;

View file

@ -339,7 +339,7 @@ public final class EntityCapsManager extends Manager {
}
});
connection.addPacketSendingListener(new StanzaListener() {
connection.addStanzaSendingListener(new StanzaListener() {
@Override
public void processStanza(Stanza packet) {
presenceSend = (Presence) packet;
@ -362,7 +362,7 @@ public final class EntityCapsManager extends Manager {
packet.overrideExtension(caps);
}
};
connection.addPacketInterceptor(packetInterceptor, PresenceTypeFilter.AVAILABLE);
connection.addStanzaInterceptor(packetInterceptor, PresenceTypeFilter.AVAILABLE);
// It's important to do this as last action. Since it changes the
// behavior of the SDM in some ways
sdm.setEntityCapsManager(this);

View file

@ -134,7 +134,7 @@ public final class LastActivityManager extends Manager {
super(connection);
// Listen to all the sent messages to reset the idle time on each one
connection.addPacketSendingListener(new StanzaListener() {
connection.addStanzaSendingListener(new StanzaListener() {
@Override
public void processStanza(Stanza packet) {
Presence presence = (Presence) packet;
@ -153,7 +153,7 @@ public final class LastActivityManager extends Manager {
}
}, StanzaTypeFilter.PRESENCE);
connection.addPacketSendingListener(new StanzaListener() {
connection.addStanzaSendingListener(new StanzaListener() {
@Override
public void processStanza(Stanza packet) {
Message message = (Message) packet;

View file

@ -334,7 +334,7 @@ public class MultiUserChat {
);
// @formatter:on
connection.addSyncStanzaListener(declinesListener, new AndFilter(fromRoomFilter, DECLINE_FILTER));
connection.addPacketInterceptor(presenceInterceptor, new AndFilter(ToMatchesFilter.create(room),
connection.addStanzaInterceptor(presenceInterceptor, new AndFilter(ToMatchesFilter.create(room),
StanzaTypeFilter.PRESENCE));
messageCollector = connection.createStanzaCollector(fromRoomGroupchatFilter);
@ -2021,7 +2021,7 @@ public class MultiUserChat {
connection.removeSyncStanzaListener(presenceListener);
connection.removeSyncStanzaListener(subjectListener);
connection.removeSyncStanzaListener(declinesListener);
connection.removePacketInterceptor(presenceInterceptor);
connection.removeStanzaInterceptor(presenceInterceptor);
if (messageCollector != null) {
messageCollector.cancel();
messageCollector = null;

View file

@ -126,7 +126,7 @@ public final class PrivacyListManager extends Manager {
});
// cached(Active|Default)ListName handling
connection.addPacketSendingListener(new StanzaListener() {
connection.addStanzaSendingListener(new StanzaListener() {
@Override
public void processStanza(Stanza packet) throws NotConnectedException {
XMPPConnection connection = connection();
@ -148,7 +148,7 @@ public final class PrivacyListManager extends Manager {
}, iqResultReplyFilter);
}
}, SetActiveListFilter.INSTANCE);
connection.addPacketSendingListener(new StanzaListener() {
connection.addStanzaSendingListener(new StanzaListener() {
@Override
public void processStanza(Stanza packet) throws NotConnectedException {
XMPPConnection connection = connection();

View file

@ -279,7 +279,7 @@ public final class DeliveryReceiptManager extends Manager {
* @see #dontAutoAddDeliveryReceiptRequests()
*/
public void autoAddDeliveryReceiptRequests() {
connection().addPacketInterceptor(AUTO_ADD_DELIVERY_RECEIPT_REQUESTS_LISTENER,
connection().addStanzaInterceptor(AUTO_ADD_DELIVERY_RECEIPT_REQUESTS_LISTENER,
MESSAGES_TO_REQUEST_RECEIPTS_FOR);
}
@ -290,7 +290,7 @@ public final class DeliveryReceiptManager extends Manager {
* @see #autoAddDeliveryReceiptRequests()
*/
public void dontAutoAddDeliveryReceiptRequests() {
connection().removePacketInterceptor(AUTO_ADD_DELIVERY_RECEIPT_REQUESTS_LISTENER);
connection().removeStanzaInterceptor(AUTO_ADD_DELIVERY_RECEIPT_REQUESTS_LISTENER);
}
/**