Package com.google.appengine.api.xmpp

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


  public static boolean getPresence(JID jid) {
    return XMPP.xmppService.getPresence(jid).isAvailable();
  }

  public static boolean getPresence(String id) {
    return XMPP.getPresence(new JID(id));
  }
View Full Code Here


  public static void sendPresence(JID to, PresenceType type, PresenceShow show, String status) {
    XMPP.xmppService.sendPresence(to, type, show, status);
  }

  public static void sendPresence(String to, PresenceType type, PresenceShow show, String status) {
    XMPP.xmppService.sendPresence(new JID(to), type, show, status);
  }
View Full Code Here

  public static void sendPresence(JID to, PresenceShow show, String status) {
    XMPP.xmppService.sendPresence(to, PresenceType.AVAILABLE, show, status);
  }

  public static void sendPresence(String to, PresenceShow show, String status) {
    XMPP.xmppService.sendPresence(new JID(to), PresenceType.AVAILABLE, show, status);
  }
View Full Code Here

  public static void sendPresence(JID to, String status) {
    XMPP.xmppService.sendPresence(to, PresenceType.AVAILABLE, PresenceShow.NONE, status);
  }

  public static void sendPresence(String to, String status) {
    XMPP.xmppService.sendPresence(new JID(to), PresenceType.AVAILABLE, PresenceShow.NONE, status);
  }
View Full Code Here

        ).getStatusMap()
          .get(to);
  }

  public static SendResponse.Status sendIM(String to, String msg) {
    return XMPP.sendIM(new JID(to), msg);
  }
View Full Code Here

        if (clazz == PostalAddress.class)
            return clazz.cast(new PostalAddress(self));
        if (clazz == Rating.class)
            return clazz.cast(new Rating(Integer.valueOf(self)));
        if (clazz == JID.class)
            return clazz.cast(new JID(self));
        if (clazz == Key.class)
            return clazz.cast(KeyFactory.stringToKey(self));
        if (clazz == String[].class)
            return clazz.cast(new String[] { self });
        return StringGroovyMethods.asType(self, clazz);
View Full Code Here

        // sets the recepients of the message
        if (msgAttr.containsKey(TO_ATTR)) {
            Object to = msgAttr.get(TO_ATTR);
            if (to instanceof String) {
                msgBuilder.withRecipientJids(new JID((String) to));
            } else if (to instanceof List<?>) {
                List<?> toList = (List<?>)to;
                JID[] jids = new JID[toList.size()];
                for (int i = 0; i < toList.size(); i++) {
                    jids[i] = new JID(String.valueOf(toList.get(i)));
                }
                msgBuilder.withRecipientJids(jids);
            }
        }

        // sets the sender of the message
        if (msgAttr.containsKey(FROM_ATTR)) {
            msgBuilder.withFromJid(new JID(String.valueOf(msgAttr.get(FROM_ATTR))));
        }

        // sets the type of the message
        if (msgAttr.containsKey(TYPE_ATTR)) {
            Object type = msgAttr.get(TYPE_ATTR);
View Full Code Here

     * Send a chat invitation to a Jabber ID.
     *
     * @param the Jabber ID to invite
     */
    public static void sendInvitation(XMPPService xmppService, String jabberId) {
        xmppService.sendInvitation(new JID(jabberId));
    }
View Full Code Here

     *
     * @param jabberIdTo the Jabber ID to invite
     * @param jabberIdFrom the Jabber ID to use to send the invitation request
     */
    public static void sendInvitation(XMPPService xmppService, String jabberIdTo, String jabberIdFrom) {
        xmppService.sendInvitation(new JID(jabberIdTo), new JID(jabberIdFrom));
    }
View Full Code Here

     *
     * @param the Jabber ID
     * @return the presence information
     */
    public static Presence getPresence(XMPPService xmppService, String jabberId) {
        return xmppService.getPresence(new JID(jabberId));
    }
View Full Code Here

TOP

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

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.