Examples of containsFeature()


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

                Iterator<DiscoverInfo.Identity> iter2 = info.getIdentities();
                while (iter2.hasNext()) {
                    DiscoverInfo.Identity identity = iter2.next();
                    if (identity.getCategory().equals("proxy") && identity.getType().equals("stun"))
                        if (info.containsFeature(NAMESPACE))
                            return true;
                }

                LOGGER.debug(item.getName()+"-"+info.getType());
View Full Code Here

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

        letsAllBeFriends();
    }
   
    public void testLocalEntityCaps() throws InterruptedException {
        DiscoverInfo info = EntityCapsManager.getDiscoveryInfoByNodeVer(ecm1.getLocalNodeVer());
        assertFalse(info.containsFeature(DISCOVER_TEST_FEATURE));

        dropWholeEntityCapsCache();

        // This should cause a new presence stanza from con1 with and updated
        // 'ver' String
View Full Code Here

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

        // with the presence stanza
        // The other connection has to receive this stanza and record the
        // information in order for this test to succeed.
        info = EntityCapsManager.getDiscoveryInfoByNodeVer(ecm1.getLocalNodeVer());
        assertNotNull(info);
        assertTrue(info.containsFeature(DISCOVER_TEST_FEATURE));
    }

    /**
     * Test if entity caps actually prevent a disco info request and reply
     *
 
View Full Code Here

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

        dropCapsCache();
        // discover that
        DiscoverInfo info = sdm0.discoverInfo(con1.getUser());
        // that discovery should cause a disco#info
        assertTrue(discoInfoSend);
        assertTrue(info.containsFeature(DISCOVER_TEST_FEATURE));
        discoInfoSend = false;

        // discover that
        info = sdm0.discoverInfo(con1.getUser());
        // that discovery shouldn't cause a disco#info
View Full Code Here

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

        // discover that
        info = sdm0.discoverInfo(con1.getUser());
        // that discovery shouldn't cause a disco#info
        assertFalse(discoInfoSend);
        assertTrue(info.containsFeature(DISCOVER_TEST_FEATURE));
    }

    public void testCapsChanged() {
        String nodeVerBefore = EntityCapsManager.getNodeVersionByJid(con1.getUser());
        sdm1.addFeature(DISCOVER_TEST_FEATURE);
View Full Code Here

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

        sdm1.addFeature(DISCOVER_TEST_FEATURE);

        Thread.sleep(3000);

        DiscoverInfo info = sdm0.discoverInfo(con1.getUser());
        assertTrue(info.containsFeature(DISCOVER_TEST_FEATURE));

        String u1ver = EntityCapsManager.getNodeVersionByJid(con1.getUser());
        assertNotNull(u1ver);

        DiscoverInfo entityInfo = EntityCapsManager.caps.get(u1ver);
View Full Code Here

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()

     */
    public static boolean isServiceEnabled(Connection 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()

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

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

                    // Send the disco packet to the server itself
                    try {
                        DiscoverInfo info = ServiceDiscoveryManager.getInstanceFor(connection)
                                .discoverInfo(serviceName);
                        // Check if the server supports JEP-33
                        if (info.containsFeature("http://jabber.org/protocol/address")) {
                            serviceAddress = serviceName;
                        }
                        else {
                            // Get the disco items and send the disco packet to each server item
                            DiscoverItems items = ServiceDiscoveryManager.getInstanceFor(connection)
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.