/** * Setup the jingle system to let the remote clients know we support Jingle. * (This used to be a static part of construction. The problem is a remote client might * attempt a Jingle connection to us after we've created an XMPPConnection, but before we've * setup an instance of a JingleManager. We will appear to not support Jingle. With the new * method you just call it once and all new connections will report Jingle support.) */ public static void setJingleServiceEnabled() { ProviderManager.addIQProvider("jingle", "urn:xmpp:tmp:jingle", new JingleProvider()); // Enable the Jingle support on every established connection // The ServiceDiscoveryManager class should have been already // initialized XMPPConnectionRegistry.addConnectionCreationListener(new ConnectionCreationListener() { @Override public void connectionCreated(XMPPConnection connection) { JingleManager.setServiceEnabled(connection, true); } }); }
/** * This test should be run in a clean (e.g. forked) VM */ @Test public void shouldInitializeSmackTest() throws Exception { ProviderManager.addIQProvider("foo", "bar", new TestIQProvider()); assertTrue(SmackConfiguration.isSmackInitialized()); }
@SuppressWarnings("unchecked") public static void addLoader(ProviderLoader loader) { if (loader.getIQProviderInfo() != null) { for (IQProviderInfo info : loader.getIQProviderInfo()) { addIQProvider(info.getElementName(), info.getNamespace(), info.getProvider()); } } if (loader.getExtensionProviderInfo() != null) { for (ExtensionProviderInfo info : loader.getExtensionProviderInfo()) { addExtensionProvider(info.getElementName(), info.getNamespace(), info.getProvider()); } } if (loader.getStreamFeatureProviderInfo() != null) { for (StreamFeatureProviderInfo info : loader.getStreamFeatureProviderInfo()) { addStreamFeatureProvider(info.getElementName(), info.getNamespace(), (ExtensionElementProvider<ExtensionElement>) info.getProvider()); } } }
pm.addIQProvider("query","jabber:iq:private", new PrivateDataManager.PrivateDataIQProvider()); pm.addIQProvider("query","jabber:iq:time", Class.forName("org.jivesoftware.smackx.packet.Time")); } catch (ClassNotFoundException e) { Log.w("TestClient", "Can't load class for org.jivesoftware.smackx.packet.Time"); pm.addIQProvider("query","http://jabber.org/protocol/disco#items", new DiscoverItemsProvider()); pm.addIQProvider("query","http://jabber.org/protocol/disco#info", new DiscoverInfoProvider()); pm.addIQProvider("query","http://jabber.org/protocol/muc#admin", new MUCAdminProvider()); pm.addIQProvider("query","http://jabber.org/protocol/muc#owner", new MUCOwnerProvider()); pm.addIQProvider("query","jabber:iq:version", Class.forName("org.jivesoftware.smackx.packet.Version")); } catch (ClassNotFoundException e) { pm.addIQProvider("vCard","vcard-temp", new VCardProvider()); pm.addIQProvider("offline","http://jabber.org/protocol/offline", new OfflineMessageRequest.Provider()); pm.addIQProvider("query","jabber:iq:last", new LastActivity.Provider()); pm.addIQProvider("query","jabber:iq:search", new UserSearch.Provider()); pm.addIQProvider("sharedgroup","http://www.jivesoftware.org/protocol/sharedgroup", new SharedGroupsInfo.Provider()); pm.addIQProvider("si","http://jabber.org/protocol/si", new StreamInitiationProvider());
pm.addIQProvider("query","jabber:iq:private", new PrivateDataManager.PrivateDataIQProvider()); pm.addIQProvider("query","jabber:iq:time", Class.forName("org.jivesoftware.smackx.packet.Time")); } catch (ClassNotFoundException e) { Log.w("TestClient", "Can't load class for org.jivesoftware.smackx.packet.Time"); pm.addIQProvider("query","http://jabber.org/protocol/disco#items", new DiscoverItemsProvider()); pm.addIQProvider("query","http://jabber.org/protocol/disco#info", new DiscoverInfoProvider()); pm.addIQProvider("query","http://jabber.org/protocol/muc#admin", new MUCAdminProvider()); pm.addIQProvider("query","http://jabber.org/protocol/muc#owner", new MUCOwnerProvider()); pm.addIQProvider("query","jabber:iq:version", Class.forName("org.jivesoftware.smackx.packet.Version")); } catch (ClassNotFoundException e) { pm.addIQProvider("vCard","vcard-temp", new VCardProvider()); pm.addIQProvider("offline","http://jabber.org/protocol/offline", new OfflineMessageRequest.Provider()); pm.addIQProvider("query","jabber:iq:last", new LastActivity.Provider()); pm.addIQProvider("query","jabber:iq:search", new UserSearch.Provider()); pm.addIQProvider("sharedgroup","http://www.jivesoftware.org/protocol/sharedgroup", new SharedGroupsInfo.Provider()); pm.addIQProvider("si","http://jabber.org/protocol/si", new StreamInitiationProvider());
/** * Creates new instance of <tt>ConferenceIqProvider</tt>. */ public ConferenceIqProvider() { // <conference> ProviderManager.addIQProvider( ConferenceIq.ELEMENT_NAME, ConferenceIq.NAMESPACE, this); }
/** * Creates new instance of <tt>ConferenceIqProvider</tt>. */ public LoginUrlIqProvider() { // <auth-url> ProviderManager.addIQProvider( LoginUrlIq.ELEMENT_NAME, LoginUrlIq.NAMESPACE, this); }
/** * Creates new instance of <tt>ConferenceIqProvider</tt>. */ public LogoutIqProvider() { //<logout> ProviderManager.addIQProvider( LogoutIq.ELEMENT_NAME, LogoutIq.NAMESPACE, this); }
import org.jivesoftware.smack.provider.ProviderManager; public class ServiceProviders { public static void Register_Providers(ProviderManager pm) { pm.addIQProvider("control", "http://domain_name.com/powertalk/control/2.0", new ListIQProvider()); } }
/** * Add <tt>IQProvider</tt> to the list of known * providers * * @param elementName The element name where the matching is happening * @param namespace The XML namespace used in that element * @param provider <tt>IQProvider</tt> implementation to be * used */ @Override public void addIQProvider(String elementName, String namespace, Object provider) { ProviderManager.addIQProvider(elementName, namespace, provider); }
public void configure(ProviderManager pm) { // MUC Admin pm.addIQProvider("query", "http://jabber.org/protocol/muc#admin",new MUCAdminProvider()); // MUC Owner pm.addIQProvider("query", "http://jabber.org/protocol/muc#owner",new MUCOwnerProvider()); pm.addIQProvider("si", "http://jabber.org/protocol/si",new StreamInitiationProvider()); pm.addIQProvider("query","http://jabber.org/protocol/bytestreams", new org.jivesoftware.smackx.provider.BytestreamsProvider()); pm.addIQProvider("query","http://jabber.org/protocol/disco#items", new DiscoverItemsProvider()); pm.addIQProvider("query","http://jabber.org/protocol/disco#info", new DiscoverInfoProvider()); // Delayed Delivery pm.addExtensionProvider("x", "jabber:x:delay",new DelayInformationProvider()); pm.addIQProvider("vCard", "vcard-temp", new VCardProvider()); // Group Chat Invitations pm.addExtensionProvider("x","jabber:x:conference", new GroupChatInvitation.Provider()); }
/** * Registers this IQ provider into given <tt>ProviderManager</tt>. */ public static void registerMuteIqProvider() { ProviderManager.addIQProvider( MuteIq.ELEMENT_NAME, MuteIq.NAMESPACE, new MuteIqProvider()); }
private void configureSmack() { if (!smackConfigured) { ProviderManager.addIQProvider(Bind.ELEMENT, Bind.NAMESPACE, new HarmonyBindIQProvider()); smackConfigured = true; } }
ProviderManager.addIQProvider( ColibriConferenceIQ.ELEMENT_NAME, ColibriConferenceIQ.NAMESPACE, ProviderManager.addIQProvider( PubSubElementType.PUBLISH.getElementName(), PubSubElementType.PUBLISH.getNamespace().getXmlns(), ProviderManager.addIQProvider( HealthCheckIQ.ELEMENT_NAME, HealthCheckIQ.NAMESPACE,
ProviderManager mgr = ProviderManager.getInstance(); mgr.addExtensionProvider(offline, http://jabber.org/protocol/offline, org.jivesoftware.smackx.packet.OfflineMessageInfo$Provider); mgr.addIQProvider(offline, http://jabber.org/protocol/offline, org.jivesoftware.smackx.packet.OfflineMessageRequest$Provider); OfflineMessageManager offMgr = new OfflineMessageManager(connection); int numOffline = offMgr.getMessageCount();
ProviderManager pm = ProviderManager.getInstance(); pm.addIQProvider( "query","jabber:iq:search",new UserSearch.Provider()); pm.addExtensionProvider("x","jabber:x:data", new DataFormProvider());
public CheckUpdates() { // Set the Jabber IQ Provider for Jabber:iq:spark ProviderManager.addIQProvider("query", "jabber:iq:spark", new SparkVersion.Provider()); // For simplicity, use an alias for the root xml tag xstream.alias("Version", SparkVersion.class); // Specify the main update url for JiveSoftware this.mainUpdateURL = "http://www.igniterealtime.org/updater/updater"; sparkPluginInstalled = isSparkPluginInstalled(SparkManager.getConnection()); }
/** * Setup the jingle system to let the remote clients know we support Jingle. * (This used to be a static part of construction. The problem is a remote client might * attempt a Jingle connection to us after we've created a XMPPConnection, but before we've * setup an instance of a JingleManager. We will appear to not support Jingle. With the new * method you just call it once and all new connections will report Jingle support.) */ public static void setJingleServiceEnabled() { ProviderManager.addIQProvider("jingle", "urn:xmpp:tmp:jingle", new JingleProvider()); // Enable the Jingle support on every established connection // The ServiceDiscoveryManager class should have been already // initialized XMPPConnection.addConnectionCreationListener(new ConnectionCreationListener() { public void connectionCreated(XMPPConnection connection) { JingleManager.setServiceEnabled(connection, true); } }); }
/** * Setup the jingle system to let the remote clients know we support Jingle. * (This used to be a static part of construction. The problem is a remote client might * attempt a Jingle connection to us after we've created a Connection, but before we've * setup an instance of a JingleManager. We will appear to not support Jingle. With the new * method you just call it once and all new connections will report Jingle support.) */ public static void setJingleServiceEnabled() { ProviderManager providerManager = ProviderManager.getInstance(); providerManager.addIQProvider("jingle", "urn:xmpp:tmp:jingle", new JingleProvider()); // Enable the Jingle support on every established connection // The ServiceDiscoveryManager class should have been already // initialized Connection.addConnectionCreationListener(new ConnectionCreationListener() { public void connectionCreated(Connection connection) { JingleManager.setServiceEnabled(connection, true); } }); }
@SuppressWarnings("unchecked") public static void addLoader(ProviderLoader loader) { if (loader.getIQProviderInfo() != null) { for (IQProviderInfo info : loader.getIQProviderInfo()) { addIQProvider(info.getElementName(), info.getNamespace(), info.getProvider()); } } if (loader.getExtensionProviderInfo() != null) { for (ExtensionProviderInfo info : loader.getExtensionProviderInfo()) { addExtensionProvider(info.getElementName(), info.getNamespace(), info.getProvider()); } } if (loader.getStreamFeatureProviderInfo() != null) { for (StreamFeatureProviderInfo info : loader.getStreamFeatureProviderInfo()) { addStreamFeatureProvider(info.getElementName(), info.getNamespace(), (ExtensionElementProvider<ExtensionElement>) info.getProvider()); } } }