/** * 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(Connection 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(Connection connection) { return ServiceDiscoveryManager.getInstanceFor(connection).includesFeature(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(Connection connection) { return ServiceDiscoveryManager.getInstanceFor(connection).includesFeature(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(Connection connection) { return ServiceDiscoveryManager.getInstanceFor(connection).includesFeature(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(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) { for (int i = 0; i < NAMESPACE.length; i++) { if (!ServiceDiscoveryManager.getInstanceFor(connection) .includesFeature(NAMESPACE[i])) return false; } return true; }
/** * 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 Connection connection) { ServiceDiscoveryManager manager = ServiceDiscoveryManager .getInstanceFor(connection); List<String> namespaces = new ArrayList<String>(); namespaces.addAll(Arrays.asList(NAMESPACE)); namespaces.add(InBandBytestreamManager.NAMESPACE); if (!IBB_ONLY) { namespaces.add(Socks5BytestreamManager.NAMESPACE); } for (String namespace : namespaces) { if (!manager.includesFeature(namespace)) { return false; } } return true; }
/** * 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 Connection connection) { ServiceDiscoveryManager manager = ServiceDiscoveryManager .getInstanceFor(connection); List<String> namespaces = new ArrayList<String>(); namespaces.addAll(Arrays.asList(NAMESPACE)); namespaces.add(InBandBytestreamManager.NAMESPACE); if (!IBB_ONLY) { namespaces.add(Socks5BytestreamManager.NAMESPACE); } for (String namespace : namespaces) { if (!manager.includesFeature(namespace)) { return false; } } return true; }
/** * 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 Connection connection) { ServiceDiscoveryManager manager = ServiceDiscoveryManager .getInstanceFor(connection); List<String> namespaces = new ArrayList<String>(); namespaces.addAll(Arrays.asList(NAMESPACE)); namespaces.add(InBandBytestreamManager.NAMESPACE); if (!IBB_ONLY) { namespaces.add(Socks5BytestreamManager.NAMESPACE); } for (String namespace : namespaces) { if (!manager.includesFeature(namespace)) { return false; } } return true; }
/** * Adds the SOCKS5 Bytestream feature to the service discovery. */ private void enableService() { ServiceDiscoveryManager manager = ServiceDiscoveryManager.getInstanceFor(this.connection); if (!manager.includesFeature(NAMESPACE)) { manager.addFeature(NAMESPACE); } }
/** * Adds the SOCKS5 Bytestream feature to the service discovery. */ private void enableService() { ServiceDiscoveryManager manager = ServiceDiscoveryManager.getInstanceFor(this.connection); if (!manager.includesFeature(NAMESPACE)) { manager.addFeature(NAMESPACE); } }
/** * Adds the SOCKS5 Bytestream feature to the service discovery. */ private void enableService() { ServiceDiscoveryManager manager = ServiceDiscoveryManager.getInstanceFor(this.connection); if (!manager.includesFeature(NAMESPACE)) { manager.addFeature(NAMESPACE); } }
/** * 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. */ public static void setServiceEnabled(final Connection connection, final boolean isEnabled) { ServiceDiscoveryManager manager = ServiceDiscoveryManager .getInstanceFor(connection); List<String> namespaces = new ArrayList<String>(); namespaces.addAll(Arrays.asList(NAMESPACE)); namespaces.add(InBandBytestreamManager.NAMESPACE); if (!IBB_ONLY) { namespaces.add(Socks5BytestreamManager.NAMESPACE); } for (String namespace : namespaces) { if (isEnabled) { if (!manager.includesFeature(namespace)) { manager.addFeature(namespace); } } else { manager.removeFeature(namespace); } } }
/** * 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. */ public static void setServiceEnabled(final Connection connection, final boolean isEnabled) { ServiceDiscoveryManager manager = ServiceDiscoveryManager .getInstanceFor(connection); List<String> namespaces = new ArrayList<String>(); namespaces.addAll(Arrays.asList(NAMESPACE)); namespaces.add(InBandBytestreamManager.NAMESPACE); if (!IBB_ONLY) { namespaces.add(Socks5BytestreamManager.NAMESPACE); } for (String namespace : namespaces) { if (isEnabled) { if (!manager.includesFeature(namespace)) { manager.addFeature(namespace); } } else { manager.removeFeature(namespace); } } }
/** * 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. */ public static void setServiceEnabled(final Connection connection, final boolean isEnabled) { ServiceDiscoveryManager manager = ServiceDiscoveryManager .getInstanceFor(connection); List<String> namespaces = new ArrayList<String>(); namespaces.addAll(Arrays.asList(NAMESPACE)); namespaces.add(InBandBytestreamManager.NAMESPACE); if (!IBB_ONLY) { namespaces.add(Socks5BytestreamManager.NAMESPACE); } for (String namespace : namespaces) { if (isEnabled) { if (!manager.includesFeature(namespace)) { manager.addFeature(namespace); } } else { manager.removeFeature(namespace); } } }