1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-29 15:32:06 +01:00

Added methods to remove providers (SMACK-118).

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@3381 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Matt Tucker 2006-01-27 18:44:17 +00:00 committed by matt
parent e7c89235ba
commit 96796a82b4

View file

@ -274,6 +274,19 @@ public class ProviderManager {
iqProviders.put(key, provider);
}
/**
* Removes an IQ provider with the specified element name and namespace. This
* method is typically called to cleanup providers that are programatically added
* using the {@link #addIQProvider(String, String, Object) addIQProvider} method.
*
* @param elementName the XML element name.
* @param namespace the XML namespace.
*/
public static void removeIQProvider(String elementName, String namespace) {
String key = getProviderKey(elementName, namespace);
iqProviders.remove(key);
}
/**
* Returns the packet extension provider registered to the specified XML element name
* and namespace. For example, if a provider was registered to the element name "x" and the
@ -318,6 +331,19 @@ public class ProviderManager {
extensionProviders.put(key, provider);
}
/**
* Removes an extension provider with the specified element name and namespace. This
* method is typically called to cleanup providers that are programatically added
* using the {@link #addExtensionProvider(String, String, Object) addExtensionProvider} method.
*
* @param elementName the XML element name.
* @param namespace the XML namespace.
*/
public static void removeExtensionProvider(String elementName, String namespace) {
String key = getProviderKey(elementName, namespace);
extensionProviders.remove(key);
}
/**
* Returns an Iterator for all PacketExtensionProvider instances.
*