Package org.jivesoftware.smackx.packet.DiscoverInfo

Examples of org.jivesoftware.smackx.packet.DiscoverInfo.Identity


            // Discover the information of another Smack client
             DiscoverInfo info = discoManager.discoverInfo(getFullJID(1));
            // Check the identity of the Smack client
            Iterator<Identity> identities = info.getIdentities();
            assertTrue("No identities were found", identities.hasNext());
            Identity identity = identities.next();
            assertEquals("Name in identity is wrong", ServiceDiscoveryManager.getIdentityName(),
                    identity.getName());
            assertEquals("Category in identity is wrong", "client", identity.getCategory());
            assertEquals("Type in identity is wrong", ServiceDiscoveryManager.getIdentityType(),
                    identity.getType());
            assertFalse("More identities were found", identities.hasNext());
        }
        catch (Exception e) {
            e.printStackTrace();
            fail(e.getMessage());
View Full Code Here


                proxyInfo = serviceDiscoveryManager.discoverInfo(item.getEntityID());
                Iterator<Identity> identities = proxyInfo.getIdentities();

                // item must have category "proxy" and type "bytestream"
                while (identities.hasNext()) {
                    Identity identity = identities.next();

                    if ("proxy".equalsIgnoreCase(identity.getCategory())
                                    && "bytestreams".equalsIgnoreCase(identity.getType())) {
                        proxies.add(item.getEntityID());
                        break;
                    }

                    /*
 
View Full Code Here

TOP

Related Classes of org.jivesoftware.smackx.packet.DiscoverInfo.Identity

Copyright © 2018 www.massapicom. 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.