/** * End announcing support for Spoiler messages. */ public void stopAnnounceSupport() { serviceDiscoveryManager.removeFeature(NAMESPACE_0); }
public synchronized void disableEntityCaps() { entityCapsEnabled = false; sdm.removeFeature(NAMESPACE); }
/** * Unregister a ChatMarkersListener. * * @param listener ChatMarkersListener * @return true, if the listener was registered before */ public synchronized boolean removeIncomingChatMarkerMessageListener(ChatMarkersListener listener) { boolean res = incomingListeners.remove(listener); if (incomingListeners.isEmpty() && enabled) { serviceDiscoveryManager.removeFeature(ChatMarkersElements.NAMESPACE); enabled = false; } return res; } }
@AfterClass public void tearDown() throws NotConnectedException, InterruptedException { RosterUtil.ensureNotSubscribedToEachOther(conOne, conTwo); ServiceDiscoveryManager[] sdms = new ServiceDiscoveryManager[] { sdmOne, sdmTwo }; for (ServiceDiscoveryManager sdm : sdms) { for (String dummyFeature : dummyFeatures) { sdm.removeFeature(dummyFeature); } } }
public synchronized void disable() { if (!enabled) return; ServiceDiscoveryManager sdm = ServiceDiscoveryManager.getInstanceFor(connection()); sdm.removeFeature(Time.NAMESPACE); enabled = false; }
public synchronized void disable() { ServiceDiscoveryManager.getInstanceFor(connection()).removeFeature(LastActivity.NAMESPACE); enabled = false; }
/** * Enable the Jabber services related to file transfer on the particular * connection. * * @param connection The connection on which to enable or disable the services. * @param isEnabled True to enable, false to disable. */ private static void setServiceEnabled(final XMPPConnection connection, final boolean isEnabled) { ServiceDiscoveryManager manager = ServiceDiscoveryManager .getInstanceFor(connection); List<String> namespaces = new ArrayList<>(); namespaces.addAll(Arrays.asList(NAMESPACE)); namespaces.add(DataPacketExtension.NAMESPACE); if (!IBB_ONLY) { namespaces.add(Bytestream.NAMESPACE); } for (String namespace : namespaces) { if (isEnabled) { manager.addFeature(namespace); } else { manager.removeFeature(namespace); } } }
serviceDiscoveryManager.removeFeature(Bytestream.NAMESPACE);
/** * Stop appending origin-id elements to outgoing stanzas and remove the feature from disco. */ public synchronized void disable() { ServiceDiscoveryManager.getInstanceFor(connection()).removeFeature(NAMESPACE); connection().removeStanzaInterceptor(stanzaListener); }
/** * Enables or disables the AMP support on a given connection.<p> * * Before starting to send AMP messages to a user, check that the user can handle XHTML * messages. Enable the AMP support to indicate that this client handles XHTML messages. * * @param connection the connection where the service will be enabled or disabled * @param enabled indicates if the service will be enabled or disabled */ public static synchronized void setServiceEnabled(XMPPConnection connection, boolean enabled) { if (isServiceEnabled(connection) == enabled) return; if (enabled) { ServiceDiscoveryManager.getInstanceFor(connection).addFeature(AMPExtension.NAMESPACE); } else { ServiceDiscoveryManager.getInstanceFor(connection).removeFeature(AMPExtension.NAMESPACE); } }
/** * Enables or disables the XHTML support on a given connection.<p> * * Before starting to send XHTML messages to a user, check that the user can handle XHTML * messages. Enable the XHTML support to indicate that this client handles XHTML messages. * * @param connection the connection where the service will be enabled or disabled * @param enabled indicates if the service will be enabled or disabled */ public static synchronized void setServiceEnabled(XMPPConnection connection, boolean enabled) { if (isServiceEnabled(connection) == enabled) return; if (enabled) { ServiceDiscoveryManager.getInstanceFor(connection).addFeature(XHTMLExtension.NAMESPACE); } else { ServiceDiscoveryManager.getInstanceFor(connection).removeFeature(XHTMLExtension.NAMESPACE); } }
/** * Enables or disables the Jingle support on a given connection. * <p> * Before starting any Jingle jmf session, check that the user can handle * it. Enable the Jingle support to indicate that this client handles Jingle * messages. * </p> * * @param connection the connection where the service will be enabled or * disabled * @param enabled indicates if the service will be enabled or disabled */ public static synchronized void setServiceEnabled(XMPPConnection connection, boolean enabled) { if (isServiceEnabled(connection) == enabled) { return; } if (enabled) { ServiceDiscoveryManager.getInstanceFor(connection).addFeature(Jingle.NAMESPACE); } else { ServiceDiscoveryManager.getInstanceFor(connection).removeFeature(Jingle.NAMESPACE); } }
/** * End announcing support for Spoiler messages. */ public void stopAnnounceSupport() { serviceDiscoveryManager.removeFeature(NAMESPACE_0); }
/** * Removes a feature that can be discovered through Disco. * * @param namespace the namespace to remove. */ public static void removeFeature(String namespace) { // Obtain the ServiceDiscoveryManager associated with my XMPPConnection ServiceDiscoveryManager discoManager = ServiceDiscoveryManager.getInstanceFor(getConnection()); // Register that a new feature is supported by this XMPP entity discoManager.removeFeature(namespace); }
/** * Stop appending origin-id elements to outgoing stanzas and remove the feature from disco. */ public synchronized void disable() { ServiceDiscoveryManager.getInstanceFor(connection()).removeFeature(NAMESPACE); connection().removeStanzaInterceptor(stanzaListener); }
/** * Enables or disables the Jingle support on a given connection. * <p/> * <p/> * Before starting any Jingle jmf session, check that the user can handle * it. Enable the Jingle support to indicate that this client handles Jingle * messages. * * @param connection the connection where the service will be enabled or * disabled * @param enabled indicates if the service will be enabled or disabled */ public synchronized static void setServiceEnabled(XMPPConnection connection, boolean enabled) { if (isServiceEnabled(connection) == enabled) { return; } if (enabled) { ServiceDiscoveryManager.getInstanceFor(connection).addFeature(Jingle.NAMESPACE); } else { ServiceDiscoveryManager.getInstanceFor(connection).removeFeature(Jingle.NAMESPACE); } }
sdm.addFeature("jabber:iq:privacy"); sdm.addFeature("jabber.org/protocol/si"); sdm.removeFeature("http://jabber.org/protocol/ibb");