Package com.google.appengine.api.xmpp

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


   
    //
    boolean isAvailable = UserPresence.isUserAvailable(jid.getId());
    if (isAvailable){
     
      MessageBuilder mb = new MessageBuilder();
      Message reply = mb.withRecipientJids(jid)
        .withMessageType(MessageType.CHAT)
        .withBody(msg)
        .withFromJid(new JID("talkfeed@appspot.com"))
        .build();
     
View Full Code Here


      return false;
    }

    JID jid = new JID(Const.EMAIL);

    Message msg = new MessageBuilder().withRecipientJids(jid)
        .withBody(msgBody).build();

    boolean messageSent = false;

    if (xmpp.getPresence(jid).isAvailable()) {
View Full Code Here

        break;
      }
      case GTalk: {
        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);
View Full Code Here

  public void envoyer(String message) {

    JID jid = new JID("julien.plagnes@gmail.com");

    Message msg = new MessageBuilder().withRecipientJids(jid)
        .withBody(message).build();

    boolean messageSent = false;
    XMPPService xmpp = XMPPServiceFactory.getXMPPService();
    if (xmpp.getPresence(jid).isAvailable()) {
View Full Code Here

      message = "Message vide";
    }

    JID jid = new JID("remi.bastide@gmail.com");

    Message msg = new MessageBuilder().withRecipientJids(jid)
        .withBody(message).build();

    boolean messageSent = false;
    XMPPService xmpp = XMPPServiceFactory.getXMPPService();
    if (xmpp.getPresence(jid).isAvailable()) {
View Full Code Here

 
  public void envoyer(String message){
   
    JID jid = new JID("coralie.ratier@gmail.com");

        Message msg = new MessageBuilder()
            .withRecipientJids(jid)
            .withBody(message)
            .build();
               
        boolean messageSent = false;
View Full Code Here

      message = "Message vide";
    }
   
    JID jid = new JID("julien.plagnes@gmail.com");

        Message msg = new MessageBuilder()
            .withRecipientJids(jid)
            .withBody(message)
            .build();
               
        boolean messageSent = false;
View Full Code Here

    JID fromJid = message.getFromJid();
    String body = message.getBody();

    JID jid = new JID("julien.plagnes@gmail.com");

    Message msg = new MessageBuilder().withRecipientJids(jid)
        .withBody("Vous m'avez dit \"" + body + "\"").build();

    boolean messageSent = false;
    XMPPService xmpp1 = XMPPServiceFactory.getXMPPService();
    if (xmpp1.getPresence(jid).isAvailable()) {
View Full Code Here

        JID fromJid = message.getFromJid();
        String body = message.getBody();
       
        JID jid = new JID("coralie.ratier@gmail.com");

        Message msg = new MessageBuilder()
            .withRecipientJids(jid)
            .withBody("Vous m'avez dit \""+body+"\"")
            .build();
               
        boolean messageSent = false;
View Full Code Here

        JID userJID = message.getFromJid();
        Entity userEntity = MainPageServlet.getUserEntity(userJID);
        userEntity.setProperty("last_chat_message", message.getBody());
        datastore.put(userEntity);

        Message reply = new MessageBuilder()
            .withRecipientJids(userJID)
            .withBody("I got your message! It had " +
                      message.getBody().length() + " characters.")
            .build();
        // (Ignore the send response.)
View Full Code Here

TOP

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

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.