Examples of Stanza


Examples of com.calclab.emite.core.stanzas.Stanza

   *            user to invite
   * @param reasonText
   *            reason for the invitation
   */
  public void sendInvitationTo(final XmppURI userJid, final String reasonText) {
    final Stanza message = new Message();
    message.setTo(roomUri.getJID());
    final XMLPacket invite = message.getXML().addChild("x", XmppNamespaces.MUC_USER).addChild("invite");
    invite.setAttribute("to", userJid.toString());
    invite.setChildText("reason", reasonText);
   
    eventBus.fireEventFromSource(new BeforeRoomInvitationSentEvent(message, invite), this);
    session.send(message);
View Full Code Here

Examples of es.udc.pfc.xmpp.stanza.Stanza

    if (!(e.getMessage() instanceof Stanza)) {
      ctx.sendUpstream(e);
      return;
    }

    final Stanza stanza = (Stanza) e.getMessage();
    if (stanza instanceof Message) {
      callback.receivedMessage((Message) stanza);
    } else if (stanza instanceof Presence) {
      callback.receivedPresence((Presence) stanza);
    } else if (stanza instanceof IQ) {
View Full Code Here

Examples of es.udc.pfc.xmpp.stanza.Stanza

       
        ctx.getPipeline().get(XMPPStreamHandler.class).loggedIn();
       
        break;
      case READY:
        final Stanza stanza = Stanza.fromElement(element);
        if (stanza == null)
          throw new Exception("Unknown stanza");

        Channels.fireMessageReceived(ctx, stanza);
        break;
View Full Code Here

Examples of ingsw.proj.cluedo.componenti.Stanza

      for (int j = xMin; j <= xMax; j++) {
        if (!(caselle[i][j] instanceof HaDestinazione))
          caselle[i][j] = new Casella(nomeStanza, new Point(j, i));
        tempStanza.add(caselle[i][j]);
      }
    stanze.add(new Stanza(nomeStanza, tempStanza));
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.util.XMLUtils.Stanza

    contentHandler.endElement("", "", "PERMISSION_STATUS");
  }

  public static PermissionStatus permissionStatusFromXml(Stanza st)
      throws InvalidXmlException {
    Stanza status = st.getChildren("PERMISSION_STATUS").get(0);
    String username = status.getValue("USERNAME");
    String groupname = status.getValue("GROUPNAME");
    FsPermission mode = fsPermissionFromXml(status);
    return new PermissionStatus(username, groupname, mode);
  }
View Full Code Here

Examples of org.apache.vysper.xmpp.stanza.Stanza

     * @param condition the error condition
     */
    private void error(BoshRequest br, String condition) {
        requestsWindow.put(br.getRid(), br);
        BoshRequest req = requestsWindow.remove(requestsWindow.firstKey());
        Stanza body = boshHandler.getTerminateResponse();
        body = boshHandler.addAttribute(body, "condition", condition);
        BoshResponse boshResponse = getBoshResponse(body, null);
        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug("BOSH writing response: {}", new String(boshResponse.getContent()));
        }
View Full Code Here

Examples of org.apache.vysper.xmpp.stanza.Stanza

     */
    synchronized public void close() {
        // respond to all the queued HTTP requests with termination responses
        while (!requestsWindow.isEmpty()) {
            BoshRequest req = requestsWindow.remove(requestsWindow.firstKey());
            Stanza body = boshHandler.getTerminateResponse();
            BoshResponse boshResponse = getBoshResponse(body, null);
            if (LOGGER.isDebugEnabled()) {
                LOGGER.debug("BOSH writing response: {}", new String(boshResponse.getContent()));
            }
            Continuation continuation = ContinuationSupport.getContinuation(req.getHttpServletRequest());
View Full Code Here

Examples of org.apache.vysper.xmpp.stanza.Stanza

            return;
        }
       
        // If there are delayed responses waiting to be sent to the BOSH client, then we wrap them all in
        // a <body/> element and send them as a HTTP response to the current HTTP request.
        Stanza delayedResponse;
        Stanza mergedResponse = null;
        while ((delayedResponse = delayedResponseQueue.poll()) != null) {
            mergedResponse = boshHandler.mergeResponses(mergedResponse, delayedResponse);
        }
        if (mergedResponse != null) {
            write0(mergedResponse);
View Full Code Here

Examples of org.apache.vysper.xmpp.stanza.Stanza

            write0(boshHandler.getEmptyResponse());
        }
    }
   
    private void sendBrokenConnectionReport(long report, long delta) {
        Stanza body = boshHandler.getTerminateResponse();
        body = boshHandler.addAttribute(body, "report", Long.toString(report));
        body = boshHandler.addAttribute(body, "time", Long.toString(delta));
        write0(body);
    }
View Full Code Here

Examples of org.apache.vysper.xmpp.stanza.Stanza

        session.write0(getTerminateResponse());
        session.close();
    }

    private void processStanza(BoshBackedSessionContext session, XMLElement element) {
        Stanza stanza;
        if (element instanceof Stanza) {
            stanza = (Stanza) element;
        } else {
            stanza = new Stanza(element.getNamespaceURI(), element.getName(), element.getNamespacePrefix(),
                    element.getAttributes(), element.getInnerFragments());
        }
        serverRuntimeContext.getStanzaProcessor().processStanza(serverRuntimeContext, session, stanza,
                session.getStateHolder());
    }
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.