Examples of PresenceBuilder


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

        // value of the presence, added by the routing logic as request parameter
        String value = request.getParameter("value");

        @SuppressWarnings("rawtypes") Map formData = parseXmppFormData(request);

        return new PresenceBuilder()
                .withFromJid(new JID((String) formData.get("from")))
                .withToJid(new JID((String) formData.get("to")))
                .withPresenceType(PresenceType.valueOf(value.toUpperCase()))
                .withPresenceShow("available".equals(value) ? PresenceShow.NONE : null)
                .build();
View Full Code Here

Examples of nu.fw.jeti.jabber.elements.PresenceBuilder

      if(loginInfo == null) return;
      new LoginStatusWindow(loginInfo,backend,1);
    }
    else
    {
      PresenceBuilder pb = new PresenceBuilder();
      pb.show = show;
      pb.status = status;
      pb.priority = loginInfo.getPriority();
      Avatars avatars = getAvatarInterface();
      //pb.addExtension(capabilities.getCaps());
      if(avatars!=null)
      {
        pb.addExtension(avatars.addHash());
      }
      if(show!=Presence.UNAVAILABLE && openPGP!=null)
      {
        pb.addExtension(openPGP.signPresence(status));
      }
      try
      {
        send(pb.build());
      } catch (InstantiationException e)
      {
        e.printStackTrace();
      }
      for(Iterator<JETIListener> j = backend.getListeners(nu.fw.jeti.events.StatusChangeListener.class);j.hasNext();)
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.