Package com.google.appengine.api.xmpp

Examples of com.google.appengine.api.xmpp.SendResponse


        .withBody(msgBody).build();

    boolean messageSent = false;

    if (xmpp.getPresence(jid).isAvailable()) {
      SendResponse status = xmpp.sendMessage(msg);
      messageSent = (status.getStatusMap().get(jid) == SendResponse.Status.SUCCESS);
    }

    return messageSent;
  }
View Full Code Here


        JID jid = new JID(getCurrentUser().getEmail());
        com.google.appengine.api.xmpp.Message xmppMessage = new MessageBuilder()
            .withRecipientJids(jid).withBody(report).build();

        XMPPService xmpp = XMPPServiceFactory.getXMPPService();
        SendResponse status = xmpp.sendMessage(xmppMessage);
        boolean messageSent = (status.getStatusMap().get(jid) == SendResponse.Status.SUCCESS);

        if (!messageSent) {
          /*
           * TODO Retry later?
           */
 
View Full Code Here

        .withBody(message).build();

    boolean messageSent = false;
    XMPPService xmpp = XMPPServiceFactory.getXMPPService();
    if (xmpp.getPresence(jid).isAvailable()) {
      SendResponse status = xmpp.sendMessage(msg);
      messageSent = (status.getStatusMap().get(jid) == SendResponse.Status.SUCCESS);
      this.mettreAJourAffichage(message);
    }

  }
View Full Code Here

        .withBody(message).build();

    boolean messageSent = false;
    XMPPService xmpp = XMPPServiceFactory.getXMPPService();
    if (xmpp.getPresence(jid).isAvailable()) {
      SendResponse status = xmpp.sendMessage(msg);
      messageSent = (status.getStatusMap().get(jid) == SendResponse.Status.SUCCESS);
    }

    if (!messageSent) {
      resp.getWriter().println("<p>Le message n'a pas �t� envoy�.</p>");
    } else {
View Full Code Here

            .build();
               
        boolean messageSent = false;
        XMPPService xmpp = XMPPServiceFactory.getXMPPService();
        if (xmpp.getPresence(jid).isAvailable()) {
            SendResponse status = xmpp.sendMessage(msg);
            messageSent = (status.getStatusMap().get(jid) == SendResponse.Status.SUCCESS);
           this.mettreAJourAffichage(message);
        }
       
      
View Full Code Here

            .build();
               
        boolean messageSent = false;
        XMPPService xmpp = XMPPServiceFactory.getXMPPService();
        if (xmpp.getPresence(jid).isAvailable()) {
            SendResponse status = xmpp.sendMessage(msg);
            messageSent = (status.getStatusMap().get(jid) == SendResponse.Status.SUCCESS);
        }

        if (!messageSent) {
          resp.getWriter().println("<p>Le message n'a pas �t� envoy�.</p>");
        }
View Full Code Here

        .withBody("Vous m'avez dit \"" + body + "\"").build();

    boolean messageSent = false;
    XMPPService xmpp1 = XMPPServiceFactory.getXMPPService();
    if (xmpp1.getPresence(jid).isAvailable()) {
      SendResponse status = xmpp1.sendMessage(msg);
      messageSent = (status.getStatusMap().get(jid) == SendResponse.Status.SUCCESS);
    }
  }
View Full Code Here

            .build();
               
        boolean messageSent = false;
        XMPPService xmpp1 = XMPPServiceFactory.getXMPPService();
        if (xmpp1.getPresence(jid).isAvailable()) {
            SendResponse status = xmpp1.sendMessage(msg);
            messageSent = (status.getStatusMap().get(jid) == SendResponse.Status.SUCCESS);
        }

       
       
View Full Code Here

            Message message = new MessageBuilder()
                .withMessageType(MessageType.CHAT)
                .withRecipientJids(jid)
                .withBody(req.getParameter("chat_message"))
                .build();
            SendResponse sendResponse = xmpp.sendMessage(message);
            if (sendResponse.getStatusMap().get(jid) == SendResponse.Status.SUCCESS) {
                adminMessage = "Chat message sent to JID " + jidStr + ".";
            } else if (sendResponse.getStatusMap().get(jid) == SendResponse.Status.INVALID_ID) {
                adminMessage = "Message not sent: invalid JID " + jidStr + ".";
            } else {
                adminMessage = "Message not sent to " + jidStr + ": internal service error.";
            }
           
View Full Code Here

        Message reply = new MessageBuilder()
            .withRecipientJids(message.getFromJid())
            .withBody(answer)
            .build();
        SendResponse success = xmpp.sendMessage(reply);
        if (success.getStatusMap().get(message.getFromJid())
            != SendResponse.Status.SUCCESS) {
            log.warning("Could not send XMPP reply to " + message.getFromJid());
        }
    }
View Full Code Here

TOP

Related Classes of com.google.appengine.api.xmpp.SendResponse

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.