/** * Returns true if Entity Caps are supported by a given JID. * * @param jid * @return true if the entity supports Entity Capabilities. * @throws XMPPErrorException * @throws NoResponseException * @throws NotConnectedException * @throws InterruptedException */ public boolean areEntityCapsSupported(Jid jid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return sdm.supportsFeature(jid, NAMESPACE); }
/** * Returns true if the given entity understands the HTTP ove XMPP transport format and allows the exchange of such. * * @param jid jid * @param connection connection * @return true if the given entity understands the HTTP ove XMPP transport format and exchange. * @throws XMPPErrorException * @throws NoResponseException * @throws NotConnectedException * @throws InterruptedException */ public static boolean isSupported(Jid jid, XMPPConnection connection) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return ServiceDiscoveryManager.getInstanceFor(connection).supportsFeature(jid, NAMESPACE); } }
/** * Returns true if the specified user handles Jingle messages. * * @param connection the connection to use to perform the service discovery * @param userID the user to check. A fully qualified xmpp ID, e.g. * jdoe@example.com * @return a boolean indicating whether the specified user handles Jingle * messages * @throws SmackException if there was no response from the server. * @throws XMPPException * @throws InterruptedException */ public static boolean isServiceEnabled(XMPPConnection connection, Jid userID) throws XMPPException, SmackException, InterruptedException { return ServiceDiscoveryManager.getInstanceFor(connection).supportsFeature(userID, Jingle.NAMESPACE); }
/** * Returns true if the specified user handles XHTML messages. * * @param connection the connection to use to perform the service discovery * @param userID the user to check. A fully qualified xmpp ID, e.g. jdoe@example.com * @return a boolean indicating whether the specified user handles XHTML messages * @throws XMPPErrorException * @throws NoResponseException * @throws NotConnectedException * @throws InterruptedException */ public static boolean isServiceEnabled(XMPPConnection connection, Jid userID) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return ServiceDiscoveryManager.getInstanceFor(connection).supportsFeature(userID, XHTMLExtension.NAMESPACE); } }
/** * Check if this MamManager's archive address supports MAM. * * @return true if MAM is supported, <code>false</code>otherwise. * * @throws NoResponseException * @throws XMPPErrorException * @throws NotConnectedException * @throws InterruptedException * @since 4.2.1 * @see <a href="https://xmpp.org/extensions/xep-0313.html#support">XEP-0313 § 7. Determining support</a> */ public boolean isSupported() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { // Note that this may return 'null' but SDM's supportsFeature() does the right thing™ then. Jid archiveAddress = getArchiveAddress(); return serviceDiscoveryManager.supportsFeature(archiveAddress, MamElements.NAMESPACE); }
/** * Query the specified entity to see if it supports the Ping protocol (XEP-0199). * * @param jid The id of the entity the query is being sent to * @return true if it supports ping, false otherwise. * @throws XMPPErrorException An XMPP related error occurred during the request * @throws NoResponseException if there was no response from the jid. * @throws NotConnectedException * @throws InterruptedException */ public boolean isPingSupported(Jid jid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return ServiceDiscoveryManager.getInstanceFor(connection()).supportsFeature(jid, Ping.NAMESPACE); }
public boolean isSupported(Jid jid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return ServiceDiscoveryManager.getInstanceFor(connection()).supportsFeature(jid, Version.NAMESPACE); }
/** * Returns true if the specified user supports the Multi-User Chat protocol. * * @param user the user to check. A fully qualified xmpp ID, e.g. jdoe@example.com. * @return a boolean indicating whether the specified user supports the MUC protocol. * @throws XMPPErrorException * @throws NoResponseException * @throws NotConnectedException * @throws InterruptedException */ public boolean isServiceEnabled(Jid user) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return ServiceDiscoveryManager.getInstanceFor(connection()).supportsFeature(user, MUCInitialPresence.NAMESPACE); }
/** * Returns true if Delivery Receipts are supported by a given JID. * * @param jid * @return true if supported * @throws SmackException if there was no response from the server. * @throws XMPPException * @throws InterruptedException */ public boolean isSupported(Jid jid) throws SmackException, XMPPException, InterruptedException { return ServiceDiscoveryManager.getInstanceFor(connection()).supportsFeature(jid, DeliveryReceipt.NAMESPACE); }
/** * Returns <code>true</code> if the given target JID supports feature SOCKS5 Bytestream. * * @param targetJID the target JID * @return <code>true</code> if the given target JID supports feature SOCKS5 Bytestream * otherwise <code>false</code> * @throws XMPPErrorException * @throws NoResponseException * @throws NotConnectedException * @throws InterruptedException */ private boolean supportsSocks5(Jid targetJID) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return ServiceDiscoveryManager.getInstanceFor(connection()).supportsFeature(targetJID, Bytestream.NAMESPACE); }
/** * Returns true if Last Activity (XEP-0012) is supported by a given JID. * * @param jid a JID to be tested for Last Activity support * @return true if Last Activity is supported, otherwise false * @throws NotConnectedException * @throws XMPPErrorException * @throws NoResponseException * @throws InterruptedException */ public boolean isLastActivitySupported(Jid jid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return ServiceDiscoveryManager.getInstanceFor(connection()).supportsFeature(jid, LastActivity.NAMESPACE); } }
/** * Returns true if the given entity understands the vCard-XML format and allows the exchange of such. * * @param jid * @return true if the given entity understands the vCard-XML format and exchange. * @throws XMPPErrorException * @throws NoResponseException * @throws NotConnectedException * @throws InterruptedException */ public boolean isSupported(Jid jid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return ServiceDiscoveryManager.getInstanceFor(connection()).supportsFeature(jid, NAMESPACE); } }
public boolean isTimeSupported(Jid jid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return ServiceDiscoveryManager.getInstanceFor(connection()).supportsFeature(jid, Time.NAMESPACE); }
/** * Determine, whether a contact announces support for XEP-0374: OpenPGP for XMPP: Instant Messaging. * * @param jid {@link BareJid} of the contact in question. * @return true if contact announces support, otherwise false. * * @throws XMPPException.XMPPErrorException in case of an XMPP protocol error * @throws SmackException.NotConnectedException if we are not connected * @throws InterruptedException if the thread gets interrupted * @throws SmackException.NoResponseException if the server doesn't respond */ public boolean contactSupportsOxInstantMessaging(BareJid jid) throws XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException, SmackException.NoResponseException { return ServiceDiscoveryManager.getInstanceFor(connection()).supportsFeature(jid, NAMESPACE_0); }
/** * Check if the PubSub service supports automatic node creation. * * @return true if the PubSub service supports automatic node creation. * @throws NoResponseException * @throws XMPPErrorException * @throws NotConnectedException * @throws InterruptedException * @since 4.2.1 * @see <a href="https://xmpp.org/extensions/xep-0060.html#publisher-publish-autocreate">XEP-0060 § 7.1.4 Automatic Node Creation</a> */ public boolean supportsAutomaticNodeCreation() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { ServiceDiscoveryManager sdm = ServiceDiscoveryManager.getInstanceFor(connection()); return sdm.supportsFeature(pubSubService, AUTO_CREATE_FEATURE); }
/** * Check if the provided domain bare JID provides a MUC service. * * @param domainBareJid the domain bare JID to check. * @return <code>true</code> if the provided JID provides a MUC service, <code>false</code> otherwise. * @throws NoResponseException * @throws XMPPErrorException * @throws NotConnectedException * @throws InterruptedException * @see <a href="http://xmpp.org/extensions/xep-0045.html#disco-service-features">XEP-45 § 6.2 Discovering the Features Supported by a MUC Service</a> * @since 4.2 */ public boolean providesMucService(DomainBareJid domainBareJid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return ServiceDiscoveryManager.getInstanceFor(connection()).supportsFeature(domainBareJid, MUCInitialPresence.NAMESPACE); }
/** * Check if the given entity supports data forms. * * @param jid the JID of the entity to check. * @return true if the entity supports data forms. * @throws NoResponseException * @throws XMPPErrorException * @throws NotConnectedException * @throws InterruptedException * @see <a href="http://xmpp.org/extensions/xep-0004.html#disco">XEP-0004: Data Forms § 6. Service Discovery</a> * @since 4.1 */ public boolean isSupported(Jid jid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return ServiceDiscoveryManager.getInstanceFor(connection()).supportsFeature(jid, NAMESPACE); } }
/** * Returns true if the specified user handles Jingle messages. * * @param connection the connection to use to perform the service discovery * @param userID the user to check. A fully qualified xmpp ID, e.g. * jdoe@example.com * @return a boolean indicating whether the specified user handles Jingle * messages * @throws SmackException if there was no response from the server. * @throws XMPPException */ public static boolean isServiceEnabled(XMPPConnection connection, String userID) throws XMPPException, SmackException { return ServiceDiscoveryManager.getInstanceFor(connection).supportsFeature(userID, Jingle.NAMESPACE); }
/** * Returns true if the given entity understands the HTTP ove XMPP transport format and allows the exchange of such. * * @param jid jid * @param connection connection * @return true if the given entity understands the HTTP ove XMPP transport format and exchange. * @throws XMPPErrorException * @throws NoResponseException * @throws NotConnectedException * @throws InterruptedException */ public static boolean isSupported(Jid jid, XMPPConnection connection) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return ServiceDiscoveryManager.getInstanceFor(connection).supportsFeature(jid, NAMESPACE); } }
/** * Check if this MamManager's archive address supports MAM. * * @return true if MAM is supported, <code>false</code>otherwise. * * @throws NoResponseException * @throws XMPPErrorException * @throws NotConnectedException * @throws InterruptedException * @since 4.2.1 * @see <a href="https://xmpp.org/extensions/xep-0313.html#support">XEP-0313 § 7. Determining support</a> */ public boolean isSupported() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { // Note that this may return 'null' but SDM's supportsFeature() does the right thing™ then. Jid archiveAddress = getArchiveAddress(); return serviceDiscoveryManager.supportsFeature(archiveAddress, MamElements.NAMESPACE); }