/** * Returns true if the Jingle support is enabled for the given connection. * * @param connection the connection to look for Jingle support * @return a boolean indicating if the Jingle support is enabled for the * given connection */ public static boolean isServiceEnabled(XMPPConnection connection) { return ServiceDiscoveryManager.getInstanceFor(connection).includesFeature(Jingle.NAMESPACE); }
/** * Returns true if the XHTML support is enabled for the given connection. * * @param connection the connection to look for XHTML support * @return a boolean indicating if the XHTML support is enabled for the given connection */ public static boolean isServiceEnabled(XMPPConnection connection) { return ServiceDiscoveryManager.getInstanceFor(connection).includesFeature(XHTMLExtension.NAMESPACE); }
/** * Checks to see if all file transfer related services are enabled on the * connection. * * @param connection The connection to check * @return True if all related services are enabled, false if they are not. */ public static boolean isServiceEnabled(final XMPPConnection connection) { 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 (!manager.includesFeature(namespace)) { return false; } } return true; }
/** * Return true, if we automatically append origin-id elements to outgoing stanzas. * * @return true if functionality is enabled, otherwise false. */ public synchronized boolean isEnabled() { ServiceDiscoveryManager disco = ServiceDiscoveryManager.getInstanceFor(connection()); return disco.includesFeature(NAMESPACE); } }
/** * Returns true if the AMP support is enabled for the given connection. * * @param connection the connection to look for AMP support * @return a boolean indicating if the AMP support is enabled for the given connection */ public static boolean isServiceEnabled(XMPPConnection connection) { connection.getXMPPServiceDomain(); return ServiceDiscoveryManager.getInstanceFor(connection).includesFeature(AMPExtension.NAMESPACE); }
/** * The SOCKS5 Bytestream feature should be removed form the service discovery manager if Socks5 * bytestream feature is disabled. */ @Test public void shouldDisableService() { Socks5BytestreamManager byteStreamManager = Socks5BytestreamManager.getBytestreamManager(connection); ServiceDiscoveryManager discoveryManager = ServiceDiscoveryManager.getInstanceFor(connection); assertTrue(discoveryManager.includesFeature(Bytestream.NAMESPACE)); byteStreamManager.disableService(); assertFalse(discoveryManager.includesFeature(Bytestream.NAMESPACE)); }
/** * Returns true if the Jingle support is enabled for the given connection. * * @param connection the connection to look for Jingle support * @return a boolean indicating if the Jingle support is enabled for the * given connection */ public static boolean isServiceEnabled(XMPPConnection connection) { return ServiceDiscoveryManager.getInstanceFor(connection).includesFeature(Jingle.NAMESPACE); }
/** * Return true, if we automatically append origin-id elements to outgoing stanzas. * * @return true if functionality is enabled, otherwise false. */ public synchronized boolean isEnabled() { ServiceDiscoveryManager disco = ServiceDiscoveryManager.getInstanceFor(connection()); return disco.includesFeature(NAMESPACE); } }
public ConferenceServices() { ServiceDiscoveryManager manager = ServiceDiscoveryManager.getInstanceFor(SparkManager.getConnection()); boolean mucSupported = manager.includesFeature("http://jabber.org/protocol/muc");