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

Rename PacketFilter (and implementing classes) and PacketExtension

to StanzaFilter and ExtensionElement.
This commit is contained in:
Florian Schmaus 2015-02-26 18:41:17 +01:00
parent 2250ac20ed
commit d4a6d8e653
233 changed files with 1175 additions and 895 deletions

View file

@ -29,10 +29,10 @@ import org.jivesoftware.smack.chat.ChatManager;
import org.jivesoftware.smack.chat.ChatManagerListener;
import org.jivesoftware.smack.chat.ChatMessageListener;
import org.jivesoftware.smack.filter.NotFilter;
import org.jivesoftware.smack.filter.PacketExtensionFilter;
import org.jivesoftware.smack.filter.PacketFilter;
import org.jivesoftware.smack.filter.StanzaExtensionFilter;
import org.jivesoftware.smack.filter.StanzaFilter;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.packet.PacketExtension;
import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smackx.chatstates.packet.ChatStateExtension;
import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
@ -55,7 +55,7 @@ public class ChatStateManager extends Manager {
private static final Map<XMPPConnection, ChatStateManager> INSTANCES =
new WeakHashMap<XMPPConnection, ChatStateManager>();
private static final PacketFilter filter = new NotFilter(new PacketExtensionFilter(NAMESPACE));
private static final StanzaFilter filter = new NotFilter(new StanzaExtensionFilter(NAMESPACE));
/**
* Returns the ChatStateManager related to the XMPPConnection and it will create one if it does
@ -96,7 +96,7 @@ public class ChatStateManager extends Manager {
/**
* Sets the current state of the provided chat. This method will send an empty bodied Message
* packet with the state attached as a {@link org.jivesoftware.smack.packet.PacketExtension}, if
* packet with the state attached as a {@link org.jivesoftware.smack.packet.ExtensionElement}, if
* and only if the new chat state is different than the last state.
*
* @param newState the new state of the chat
@ -170,7 +170,7 @@ public class ChatStateManager extends Manager {
}
public void processMessage(Chat chat, Message message) {
PacketExtension extension = message.getExtension(NAMESPACE);
ExtensionElement extension = message.getExtension(NAMESPACE);
if (extension == null) {
return;
}

View file

@ -18,8 +18,8 @@
package org.jivesoftware.smackx.chatstates.packet;
import org.jivesoftware.smackx.chatstates.ChatState;
import org.jivesoftware.smack.packet.PacketExtension;
import org.jivesoftware.smack.provider.PacketExtensionProvider;
import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.provider.ExtensionElementProvider;
import org.jivesoftware.smack.util.XmlStringBuilder;
import org.xmlpull.v1.XmlPullParser;
@ -30,7 +30,7 @@ import org.xmlpull.v1.XmlPullParser;
* @author Alexander Wenckus
* @see org.jivesoftware.smackx.chatstates.ChatState
*/
public class ChatStateExtension implements PacketExtension {
public class ChatStateExtension implements ExtensionElement {
public static final String NAMESPACE = "http://jabber.org/protocol/chatstates";
@ -66,7 +66,7 @@ public class ChatStateExtension implements PacketExtension {
return xml;
}
public static class Provider extends PacketExtensionProvider<ChatStateExtension> {
public static class Provider extends ExtensionElementProvider<ChatStateExtension> {
@Override
public ChatStateExtension parse(XmlPullParser parser, int initialDepth) {