Examples of containsFeature()


Examples of org.jivesoftware.smackx.packet.DiscoverInfo.containsFeature()

     *         messages
     */
    public static boolean isServiceEnabled(Connection connection, String userID) {
        try {
            DiscoverInfo result = ServiceDiscoveryManager.getInstanceFor(connection).discoverInfo(userID);
            return result.containsFeature(Jingle.NAMESPACE);
        } catch (XMPPException e) {
            e.printStackTrace();
            return false;
        }
    }
View Full Code Here

Examples of org.jivesoftware.smackx.packet.DiscoverInfo.containsFeature()

            DiscoverInfoWrapper info = cache.get(rqJID.toString());
            if (info == null)
                continue;

            DiscoverInfo disco = info.item;
            if (disco != null && disco.containsFeature(namespace))
                return true;
        }

        if (allCached) {
            return false;
View Full Code Here

Examples of org.jivesoftware.smackx.packet.DiscoverInfo.containsFeature()

            notifyFeatureSupportUpdated(recipient, feature, false);
            return false;
        }

        notifyFeatureSupportUpdated(recipient, feature,
            disco.containsFeature(feature));
        return disco.containsFeature(feature);
    }

    /**
     * Perform a ServiceDiscovery [1] and check if the given resource is among
View Full Code Here

Examples of org.jivesoftware.smackx.packet.DiscoverInfo.containsFeature()

            return false;
        }

        notifyFeatureSupportUpdated(recipient, feature,
            disco.containsFeature(feature));
        return disco.containsFeature(feature);
    }

    /**
     * Perform a ServiceDiscovery [1] and check if the given resource is among
     * the features supported by the given recipient.
View Full Code Here

Examples of org.jivesoftware.smackx.packet.DiscoverInfo.containsFeature()

        ServiceDiscoveryManager discoManager = ServiceDiscoveryManager.getInstanceFor(connection);

        try {
            String workgroupService = StringUtils.parseServer(workgroupJID);
            DiscoverInfo infoResult = discoManager.discoverInfo(workgroupService);
            return infoResult.containsFeature("jive:email:provider");
        }
        catch (XMPPException e) {
            return false;
        }
    }
View Full Code Here

Examples of org.jivesoftware.smackx.packet.DiscoverInfo.containsFeature()

     * @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 the number of offline messages for the user of the connection.
     *
 
View Full Code Here

Examples of org.jivesoftware.smackx.packet.DiscoverInfo.containsFeature()

                catch (XMPPException e) {
                    // Ignore Case
                    continue;
                }

                if (info.containsFeature("jabber:iq:search")) {
                    searchServices.add(item.getEntityID());
                }
            }
            catch (Exception e) {
                // No info found.
View Full Code Here

Examples of org.jivesoftware.smackx.packet.DiscoverInfo.containsFeature()

     */
    public static boolean isServiceEnabled(XMPPConnection connection, String userID) {
        try {
            DiscoverInfo result =
                ServiceDiscoveryManager.getInstanceFor(connection).discoverInfo(userID);
            return result.containsFeature(namespace);
        }
        catch (XMPPException e) {
            e.printStackTrace();
            return false;
        }
View Full Code Here

Examples of org.jivesoftware.smackx.packet.DiscoverInfo.containsFeature()

     * @return true if the server supports publishing of items.
     * @throws XMPPException if the operation failed for some reason.
     */
    public boolean canPublishItems(String entityID) throws XMPPException {
        DiscoverInfo info = discoverInfo(entityID);
        return info.containsFeature("http://jabber.org/protocol/disco#publish");
    }

    /**
     * Publishes new items to a parent entity. The item elements to publish MUST have at least
     * a 'jid' attribute specifying the Entity ID of the item, and an action attribute which
View Full Code Here

Examples of org.jivesoftware.smackx.packet.DiscoverInfo.containsFeature()

        DiscoverItems items = discoManager.discoverItems(con.getServiceName());
        for (Iterator it = items.getItems(); it.hasNext();) {
            DiscoverItems.Item item = (DiscoverItems.Item) it.next();
            try {
                DiscoverInfo info = discoManager.discoverInfo(item.getEntityID());
                if (info.containsFeature("jabber:iq:search")) {
                    searchServices.add(item.getEntityID());
                }
            }
            catch (XMPPException e) {
                // No info found.
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.