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

s/processPacket/processStanza/ s/PacketCollector/StanzaCollector/

This commit is contained in:
Florian Schmaus 2017-01-03 11:12:34 +01:00
parent 9328182912
commit 90a5e289f8
100 changed files with 406 additions and 406 deletions

View file

@ -17,7 +17,7 @@
package org.jivesoftware.smack.chat;
import org.jivesoftware.smack.PacketCollector;
import org.jivesoftware.smack.StanzaCollector;
import org.jivesoftware.smack.SmackException.NotConnectedException;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.util.StringUtils;
@ -155,14 +155,14 @@ public class Chat {
}
/**
* Creates a {@link org.jivesoftware.smack.PacketCollector} which will accumulate the Messages
* for this chat. Always cancel PacketCollectors when finished with them as they will accumulate
* Creates a {@link org.jivesoftware.smack.StanzaCollector} which will accumulate the Messages
* for this chat. Always cancel StanzaCollectors when finished with them as they will accumulate
* messages indefinitely.
*
* @return the PacketCollector which returns Messages for this chat.
* @return the StanzaCollector which returns Messages for this chat.
*/
public PacketCollector createCollector() {
return chatManager.createPacketCollector(this);
public StanzaCollector createCollector() {
return chatManager.createStanzaCollector(this);
}
/**

View file

@ -28,7 +28,7 @@ import java.util.logging.Logger;
import org.jivesoftware.smack.Manager;
import org.jivesoftware.smack.MessageListener;
import org.jivesoftware.smack.PacketCollector;
import org.jivesoftware.smack.StanzaCollector;
import org.jivesoftware.smack.StanzaListener;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.SmackException.NotConnectedException;
@ -149,7 +149,7 @@ public final class ChatManager extends Manager{
// Add a listener for all message packets so that we can deliver
// messages to the best Chat instance available.
connection.addSyncStanzaListener(new StanzaListener() {
public void processPacket(Stanza packet) {
public void processStanza(Stanza packet) {
Message message = (Message) packet;
Chat chat;
if (message.getThread() == null) {
@ -378,8 +378,8 @@ public final class ChatManager extends Manager{
connection().sendStanza(message);
}
PacketCollector createPacketCollector(Chat chat) {
return connection().createPacketCollector(new AndFilter(new ThreadFilter(chat.getThreadID()),
StanzaCollector createStanzaCollector(Chat chat) {
return connection().createStanzaCollector(new AndFilter(new ThreadFilter(chat.getThreadID()),
FromMatchesFilter.create(chat.getParticipant())));
}