powered by Jive Software

org.jivesoftware.smack.provider.ProviderManager interface change

All,

First off, thanks for adding the ProviderManager class to the library, it greatly eases the development of custom packet handlers (for XMLRPC et al.) to implement extensions. However, we’‘ve noted that it looks, by default for WEB-INF/smack.providers which, while functional, implies a J2EE/Servlet use. We’'ve wound up forking this file to add a method with this signature

public static void setProvider(String elementName, String namespace, IQProvider provider)

so we can programatically add IQProviders. It would be a good thing if that can be merged into the base distribution.

Here’‘s how we’'ve implemented it:

public static void setProvider(String elementName, String namespace, IQProvider provider)    {           String key = getProviderKey(elementName, namespace);
          iqProviders.put(key, provider);     }

Thanks,

Steve

Message was edited by: dataknife

Steve,

Urg, it should be in “META-INF” instead of “WEB-INF” so that it will work in generic JAR files. I’'ll make that change and will also add the programmatic support as you suggest.

Thanks!

Matt