public void disableEntityCaps() { entityCapsEnabled = false; sdm.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); } } }
/** * 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 XMPPConnection connection, final boolean isEnabled) { ServiceDiscoveryManager manager = ServiceDiscoveryManager .getInstanceFor(connection); for (int i = 0; i < NAMESPACE.length; i++) { if (isEnabled) { manager.addFeature(NAMESPACE[i]); } else { manager.removeFeature(NAMESPACE[i]); } } }
discoManager.setIdentityCategory("component"); discoManager.removeFeature("http://jabber.org/protocol/xhtml-im"); discoManager.removeFeature("http://jabber.org/protocol/muc");
discoManager.setIdentityCategory("component"); discoManager.removeFeature("http://jabber.org/protocol/xhtml-im"); discoManager.removeFeature("http://jabber.org/protocol/muc");
serviceDiscoveryManager.removeFeature(NAMESPACE);
serviceDiscoveryManager.removeFeature(NAMESPACE);
discoManager.setIdentityCategory("component"); discoManager.removeFeature("http://jabber.org/protocol/xhtml-im"); discoManager.removeFeature("http://jabber.org/protocol/muc");
serviceDiscoveryManager.removeFeature(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 synchronized static void setServiceEnabled(Connection connection, boolean enabled) { if (isServiceEnabled(connection) == enabled) return; if (enabled) { ServiceDiscoveryManager.getInstanceFor(connection).addFeature(namespace); } else { ServiceDiscoveryManager.getInstanceFor(connection).removeFeature(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 synchronized static void setServiceEnabled(Connection connection, boolean enabled) { if (isServiceEnabled(connection) == enabled) return; if (enabled) { ServiceDiscoveryManager.getInstanceFor(connection).addFeature(namespace); } else { ServiceDiscoveryManager.getInstanceFor(connection).removeFeature(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 synchronized static void setServiceEnabled(Connection connection, boolean enabled) { if (isServiceEnabled(connection) == enabled) return; if (enabled) { ServiceDiscoveryManager.getInstanceFor(connection).addFeature(namespace); } else { ServiceDiscoveryManager.getInstanceFor(connection).removeFeature(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 synchronized static void setServiceEnabled(XMPPConnection connection, boolean enabled) { if (isServiceEnabled(connection) == enabled) return; if (enabled) { ServiceDiscoveryManager.getInstanceFor(connection).addFeature(namespace); } else { ServiceDiscoveryManager.getInstanceFor(connection).removeFeature(namespace); } }
/** * 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(Connection connection, boolean enabled) { if (isServiceEnabled(connection) == enabled) { return; } if (enabled) { ServiceDiscoveryManager.getInstanceFor(connection).addFeature(Jingle.NAMESPACE); } else { ServiceDiscoveryManager.getInstanceFor(connection).removeFeature(Jingle.NAMESPACE); } }