Package com.calclab.emite.core.client.xmpp.stanzas

Examples of com.calclab.emite.core.client.xmpp.stanzas.IQ


      }
  });
    }

    public void bindResource(final String resource) {
  final IQ iq = new IQ(IQ.Type.set);
  iq.setId("bind-resource");
  iq.addChild("bind", "urn:ietf:params:xml:ns:xmpp-bind").addChild("resource", null).setText(resource);

  connection.send(iq);
    }
View Full Code Here


    } else if (name.equals("presence")) {
        onPresence.fire(new Presence(stanza));
    } else if (name.equals("iq")) {
        final String type = stanza.getAttribute("type");
        if ("get".equals(type) || "set".equals(type)) {
      onIQ.fire(new IQ(stanza));
        } else {
      iqManager.handle(stanza);
        }
    } else if (transaction != null && "stream:features".equals(name) && stanza.hasChild("mechanisms")) {
        saslManager.sendAuthorizationRequest(transaction);
View Full Code Here

    public void onSessionCreated(final Listener<XmppURI> listener) {
  onSessionCreated.add(listener);
    }

    public void requestSession(final XmppURI uri) {
  final IQ iq = new IQ(IQ.Type.set, uri.getHostURI());
  iq.setFrom(uri);
  iq.setAttribute("id", "im-session-request");
  iq.Includes("session", "urn:ietf:params:xml:ns:xmpp-session");

  connection.send(iq);
    }
View Full Code Here

TOP

Related Classes of com.calclab.emite.core.client.xmpp.stanzas.IQ

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.