/** * 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); }
/** * 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); }
Gateway(Connection connection, String entityJID){ this.connection = connection; this.roster = connection.getRoster(); this.sdManager = ServiceDiscoveryManager.getInstanceFor(connection); this.entityJID = entityJID; }
private CarbonManager(Connection connection) { ServiceDiscoveryManager sdm = ServiceDiscoveryManager.getInstanceFor(connection); sdm.addFeature(Carbon.NAMESPACE); this.connection = connection; instances.put(connection, this); }
private EntityCapsManager(Connection connection) { this.weakRefConnection = new WeakReference<Connection>(connection); this.sdm = ServiceDiscoveryManager.getInstanceFor(connection); init(); }
/** * Discover the commands of an specific JID. The <code>jid</code> is a * full JID. * * @param jid the full JID to retrieve the commands for. * @return the discovered items. * @throws XMPPException if the operation failed for some reason. */ public DiscoverItems discoverCommands(String jid) throws XMPPException { ServiceDiscoveryManager serviceDiscoveryManager = ServiceDiscoveryManager .getInstanceFor(connection); return serviceDiscoveryManager.discoverItems(jid, discoNode); }
/** * Discover the commands of an specific JID. The <code>jid</code> is a * full JID. * * @param jid the full JID to retrieve the commands for. * @return the discovered items. * @throws XMPPException if the operation failed for some reason. */ public DiscoverItems discoverCommands(String jid) throws XMPPException { ServiceDiscoveryManager serviceDiscoveryManager = ServiceDiscoveryManager .getInstanceFor(connection); return serviceDiscoveryManager.discoverItems(jid, discoNode); }
/** * 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); } }
/** * Returns true if the server supports Flexible Offline Message Retrieval. When the server * supports Flexible Offline Message Retrieval it is possible to get the header of the offline * messages, get specific messages, delete specific messages, etc. * * @return a boolean indicating if the server supports Flexible Offline Message Retrieval. * @throws XMPPException If the user is not allowed to make this request. */ public boolean supportsFlexibleRetrieval() throws XMPPException { DiscoverInfo info = ServiceDiscoveryManager.getInstanceFor(connection).discoverInfo(null); return info.containsFeature(namespace); }
private PingManager(Connection connection) { ServiceDiscoveryManager sdm = ServiceDiscoveryManager.getInstanceFor(connection); sdm.addFeature(NAMESPACE); this.connection = connection; init(); }
/** * Returns true if the server supports Flexible Offline Message Retrieval. When the server * supports Flexible Offline Message Retrieval it is possible to get the header of the offline * messages, get specific messages, delete specific messages, etc. * * @return a boolean indicating if the server supports Flexible Offline Message Retrieval. * @throws XMPPException If the user is not allowed to make this request. */ public boolean supportsFlexibleRetrieval() throws XMPPException { DiscoverInfo info = ServiceDiscoveryManager.getInstanceFor(connection).discoverInfo(null); return info.containsFeature(namespace); }
/** * Returns true if the server supports Flexible Offline Message Retrieval. When the server * supports Flexible Offline Message Retrieval it is possible to get the header of the offline * messages, get specific messages, delete specific messages, etc. * * @return a boolean indicating if the server supports Flexible Offline Message Retrieval. * @throws XMPPException If the user is not allowed to make this request. */ public boolean supportsFlexibleRetrieval() throws XMPPException { DiscoverInfo info = ServiceDiscoveryManager.getInstanceFor(connection).discoverInfo(null); return info.containsFeature(namespace); }
private DeliveryReceiptManager(Connection connection) { ServiceDiscoveryManager sdm = ServiceDiscoveryManager.getInstanceFor(connection); sdm.addFeature(DeliveryReceipt.NAMESPACE); this.connection = connection; instances.put(connection, this); // register listener for delivery receipts and requests connection.addPacketListener(this, new PacketExtensionFilter(DeliveryReceipt.NAMESPACE)); }
/** * Returns true if the server supports Flexible Offline Message Retrieval. When the server * supports Flexible Offline Message Retrieval it is possible to get the header of the offline * messages, get specific messages, delete specific messages, etc. * * @return a boolean indicating if the server supports Flexible Offline Message Retrieval. * @throws XMPPException If the user is not allowed to make this request. */ public boolean supportsFlexibleRetrieval() throws XMPPException { DiscoverInfo info = ServiceDiscoveryManager.getInstanceFor(connection).discoverInfo(connection.getServiceName()); return info.containsFeature(namespace); }
private void init() { connection.getChatManager().addOutgoingMessageInterceptor(outgoingInterceptor, filter); connection.getChatManager().addChatListener(incomingInterceptor); ServiceDiscoveryManager.getInstanceFor(connection) .addFeature("http://jabber.org/protocol/chatstates"); }
private void init() { connection.getChatManager().addOutgoingMessageInterceptor(outgoingInterceptor, filter); connection.getChatManager().addChatListener(incomingInterceptor); ServiceDiscoveryManager.getInstanceFor(connection) .addFeature("http://jabber.org/protocol/chatstates"); }
private void init() { connection.getChatManager().addOutgoingMessageInterceptor(outgoingInterceptor, filter); connection.getChatManager().addChatListener(incomingInterceptor); ServiceDiscoveryManager.getInstanceFor(connection) .addFeature("http://jabber.org/protocol/chatstates"); }