Examples of containsFeature()


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

                    // 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

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

                                    .discoverItems(serviceName);
                            for (Iterator it = items.getItems(); it.hasNext();) {
                                DiscoverItems.Item item = (DiscoverItems.Item) it.next();
                                info = ServiceDiscoveryManager.getInstanceFor(connection)
                                        .discoverInfo(item.getEntityID(), item.getNode());
                                if (info.containsFeature("http://jabber.org/protocol/address")) {
                                    serviceAddress = serviceName;
                                    break;
                                }
                            }
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()

        manager = ServiceDiscoveryManager.getInstanceFor( parent.getJavwerManager().getConnection() );
        TreeItem item = new TreeItem( tree, SWT.NONE );
        try {
        DiscoverInfo info = manager.discoverInfo( entityID );
       
        item.setData( "jabber:iq:register", Boolean.toString( info.containsFeature( "jabber:iq:register" ) ) );
        item.setData( "jabber:iq:search", Boolean.toString( info.containsFeature( "jabber:iq:search" ) ) );
        item.setData( "http://jabber.org/protocol/muc", Boolean.toString( info.containsFeature( "http://jabber.org/protocol/muc" ) ) );
        } catch( Exception e ) {}
        //item.setData( "jabber:iq:register", "true" );
        item.setText( entityID );
View Full Code Here

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

        TreeItem item = new TreeItem( tree, SWT.NONE );
        try {
        DiscoverInfo info = manager.discoverInfo( entityID );
       
        item.setData( "jabber:iq:register", Boolean.toString( info.containsFeature( "jabber:iq:register" ) ) );
        item.setData( "jabber:iq:search", Boolean.toString( info.containsFeature( "jabber:iq:search" ) ) );
        item.setData( "http://jabber.org/protocol/muc", Boolean.toString( info.containsFeature( "http://jabber.org/protocol/muc" ) ) );
        } catch( Exception e ) {}
        //item.setData( "jabber:iq:register", "true" );
        item.setText( entityID );
        displayEntityTree( item, entityID, null );
View Full Code Here

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

        try {
        DiscoverInfo info = manager.discoverInfo( entityID );
       
        item.setData( "jabber:iq:register", Boolean.toString( info.containsFeature( "jabber:iq:register" ) ) );
        item.setData( "jabber:iq:search", Boolean.toString( info.containsFeature( "jabber:iq:search" ) ) );
        item.setData( "http://jabber.org/protocol/muc", Boolean.toString( info.containsFeature( "http://jabber.org/protocol/muc" ) ) );
        } catch( Exception e ) {}
        //item.setData( "jabber:iq:register", "true" );
        item.setText( entityID );
        displayEntityTree( item, entityID, null );
       
View Full Code Here

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

                TreeItem treeItem = new TreeItem( parent, SWT.NONE );
                parent.setExpanded( true );
                String text[] = { item.getEntityID(), item.getName(), item.getNode(), item.getAction() };
                treeItem.setText( text );
                DiscoverInfo info = manager.discoverInfo( item.getEntityID() );
                treeItem.setData( "jabber:iq:register", Boolean.toString( info.containsFeature( "jabber:iq:register" ) ) );
                treeItem.setData( "jabber:iq:search", Boolean.toString( info.containsFeature( "jabber:iq:search" ) ) );
                treeItem.setData( "http://jabber.org/protocol/muc", Boolean.toString( info.containsFeature( "http://jabber.org/protocol/muc" ) ) );
                for( Iterator j = info.getIdentities(); j.hasNext(); ) {
                    DiscoverInfo.Identity ident = (DiscoverInfo.Identity) j.next();
                    treeItem.setText( 3, ident.getType() + " > " + ident.getCategory() + " > " + ident.getName() );
View Full Code Here

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

                parent.setExpanded( true );
                String text[] = { item.getEntityID(), item.getName(), item.getNode(), item.getAction() };
                treeItem.setText( text );
                DiscoverInfo info = manager.discoverInfo( item.getEntityID() );
                treeItem.setData( "jabber:iq:register", Boolean.toString( info.containsFeature( "jabber:iq:register" ) ) );
                treeItem.setData( "jabber:iq:search", Boolean.toString( info.containsFeature( "jabber:iq:search" ) ) );
                treeItem.setData( "http://jabber.org/protocol/muc", Boolean.toString( info.containsFeature( "http://jabber.org/protocol/muc" ) ) );
                for( Iterator j = info.getIdentities(); j.hasNext(); ) {
                    DiscoverInfo.Identity ident = (DiscoverInfo.Identity) j.next();
                    treeItem.setText( 3, ident.getType() + " > " + ident.getCategory() + " > " + ident.getName() );
                }
View Full Code Here

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

                String text[] = { item.getEntityID(), item.getName(), item.getNode(), item.getAction() };
                treeItem.setText( text );
                DiscoverInfo info = manager.discoverInfo( item.getEntityID() );
                treeItem.setData( "jabber:iq:register", Boolean.toString( info.containsFeature( "jabber:iq:register" ) ) );
                treeItem.setData( "jabber:iq:search", Boolean.toString( info.containsFeature( "jabber:iq:search" ) ) );
                treeItem.setData( "http://jabber.org/protocol/muc", Boolean.toString( info.containsFeature( "http://jabber.org/protocol/muc" ) ) );
                for( Iterator j = info.getIdentities(); j.hasNext(); ) {
                    DiscoverInfo.Identity ident = (DiscoverInfo.Identity) j.next();
                    treeItem.setText( 3, ident.getType() + " > " + ident.getCategory() + " > " + ident.getName() );
                }
                /*
 
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.