Examples of ItemDiscovery


Examples of rocks.xmpp.extensions.disco.model.items.ItemDiscovery

                                xmppSession.send(iq.createError(new StanzaError(new ItemNotFound())));
                                e.consume();
                            }
                        }
                    } else {
                        ItemDiscovery itemDiscovery = iq.getExtension(ItemDiscovery.class);
                        if (itemDiscovery != null) {
                            if (itemDiscovery.getNode() == null) {
                                IQ result = iq.createResult();
                                result.setExtension(new ItemDiscovery(items));
                                xmppSession.send(result);
                                e.consume();
                            } else {
                                ItemNode itemNode = itemNodeMap.get(itemDiscovery.getNode());
                                if (itemNode != null) {
                                    IQ result = iq.createResult();
                                    result.setExtension(new ItemDiscovery(itemNode.getNode(), items));
                                    xmppSession.send(result);
                                    e.consume();
                                } else {
                                    xmppSession.send(iq.createError(new StanzaError(new ItemNotFound())));
                                    e.consume();
View Full Code Here

Examples of rocks.xmpp.extensions.disco.model.items.ItemDiscovery

     * @return The discovered items.
     * @throws rocks.xmpp.core.stanza.model.StanzaException If the entity returned a stanza error.
     * @throws rocks.xmpp.core.session.NoResponseException  If the entity did not respond.
     */
    public ItemNode discoverItems(Jid jid, String node) throws XmppException {
        IQ iq = new IQ(IQ.Type.GET, new ItemDiscovery(node));
        iq.setTo(jid);
        IQ result = xmppSession.query(iq);
        return result.getExtension(ItemDiscovery.class);
    }
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.