Package com.calclab.emite.core.client.packet

Examples of com.calclab.emite.core.client.packet.Packet


    public BasicStanza(final IPacket stanza) {
  super(stanza);
    }

    public BasicStanza(final String name, final String xmlns) {
  super(new Packet(name, xmlns));
    }
View Full Code Here


  connection.send(response);
  currentTransaction.setState(State.waitingForAuthorization);
    }

    private IPacket createAnonymousAuthorization() {
  final IPacket auth = new Packet("auth", XMLNS).With("mechanism", "ANONYMOUS");
  return auth;
    }
View Full Code Here

  final IPacket auth = new Packet("auth", XMLNS).With("mechanism", "ANONYMOUS");
  return auth;
    }

    private IPacket createPlainAuthorization(final AuthorizationTransaction authorizationTransaction) {
  final IPacket auth = new Packet("auth", XMLNS).With("mechanism", "PLAIN");
  final String encoded = encode(authorizationTransaction.uri.getHost(), authorizationTransaction.uri.getNode(),
    authorizationTransaction.getPassword());
  auth.setText(encoded);
  return auth;
    }
View Full Code Here

  }
    }

    private void createBody() {
  if (body == null) {
      this.body = new Packet("body");
      body.With("xmlns", "http://jabber.org/protocol/httpbind");
      body.With("rid", stream.getNextRid());
      if (stream != null) {
    body.With("sid", stream.sid);
      }
View Full Code Here

      }
  }
    }

    private void createInitialBody(final BoshSettings userSettings) {
  this.body = new Packet("body");
  body.setAttribute("content", "text/xml; charset=utf-8");
  body.setAttribute("xmlns", "http://jabber.org/protocol/httpbind");
  body.setAttribute("xmlns:xmpp", "urn:xmpp:xbosh");
  body.setAttribute("ver", userSettings.version);
  body.setAttribute("xmpp:version", "1.0");
View Full Code Here

TOP

Related Classes of com.calclab.emite.core.client.packet.Packet

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.