Examples of Presence


Examples of br.com.visualmidia.business.Presence

      Person person = registration.getStudent();

      TableItem item = new TableItem(replacementStudentTable, SWT.LEFT);
            item.setText(0, registration.getIdRegistration());
            item.setText(1, person.getName());
            Presence replacementOfPresence = registrationAppointment.getReplacementOfPresence();
            item.setText(2, (replacementOfPresence == null) ? "" : replacementOfPresence.getDate().getFormatedDate() + " " +replacementOfPresence.getDate().getHourOfDay()+"h.");
            item.setText(3, registrationMap.getPresentStatus(registration, date));
    }
    }
View Full Code Here

Examples of com.calclab.emite.core.client.xmpp.stanzas.Presence

      public void onEvent(final IPacket stanza) {
    final String name = stanza.getName();
    if (name.equals("message")) {
        onMessage.fire(new Message(stanza));
    } else if (name.equals("presence")) {
        onPresence.fire(new Presence(stanza));
    } else if (name.equals("iq")) {
        final String type = stanza.getAttribute("type");
        if ("get".equals(type) || "set".equals(type)) {
      onIQ.fire(new IQ(stanza));
        } else {
View Full Code Here

Examples of com.calclab.emite.core.client.xmpp.stanzas.Presence

    public SessionReady(final Session session) {
  session.onStateChanged(new Listener<State>() {
      public void onEvent(final State state) {
    if (state == State.loggedIn) {
        session.send(new Presence());
        session.setReady();
    }
      }
  });
    }
View Full Code Here

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

    }
  }
 
  @Override
  public final void onPresenceReceived(final PresenceReceivedEvent event) {
    final Presence presence = event.getPresence();
    final RoomChat chat = getRoom(presence.getFrom());
    if (chat != null) {
      chat.receivePresence(presence);
    }
  }
View Full Code Here

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

   */
  public static final void sendMessage(JID jid, String msg){
   
    XMPPService xmpp = XMPPServiceFactory.getXMPPService();
   
    Presence presence = xmpp.getPresence(jid , new JID("talkfeed@appspot.com"));

   
    Logger log = Logger.getLogger(TalkService.class.getName());
    log.info(" send message to : " + jid.getId()
        + ". Presence : " + presence.isAvailable()
        + ". presence show : " + presence.getPresenceShow()
        + ". presence type : "+ presence.getPresenceType());
   
    //
    boolean isAvailable = UserPresence.isUserAvailable(jid.getId());
    if (isAvailable){
     
View Full Code Here

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

   * @throws IOException
   */
  public static final Presence getPresence(HttpServletRequest req) throws IOException{

    XMPPService xmpp = XMPPServiceFactory.getXMPPService();
    Presence presence = xmpp.parsePresence(req);
   
    Logger.getLogger("TalkService").info(
        " getPresenceFrom : " + presence.getFromJid().getId()  + "("
        + presence.isAvailable() + ")");
    /*
    user = TextTools.cleanJID(presence.getFromJid().getId());*/
    return presence;
  }
View Full Code Here

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

   
    //PRESENCE
    if(action.contains("presence")){
      UserManager um = new UserManager();
     
      Presence presence = TalkService.getPresence(req);
     
      String user = TextTools.cleanJID(presence.getFromJid().getId());
      um.setUserPresence(user, presence);
    }
   

  }
View Full Code Here

Examples of com.sissi.protocol.presence.Presence

*/
public class RosterRemove2FansPresenceProcessor extends ProxyProcessor {

  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    Presence presence = new Presence().type(PresenceType.UNAVAILABLE);
    JID to = super.build(protocol.cast(Roster.class).first().getJid());
    for (JID resource : super.resources(context.jid())) {
      super.broadcast(to, presence.setFrom(resource));
    }
    return true;
  }
View Full Code Here

Examples of com.sissi.protocol.presence.Presence

*/
public class RosterRemove2SelfsPresenceProcessor extends ProxyProcessor {

  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    Presence presence = new Presence().type(PresenceType.UNAVAILABLE);
    for (JID resource : super.resources(super.build(protocol.cast(Roster.class).first().getJid()))) {
      super.broadcast(context.jid(), presence.setFrom(resource));
    }
    return true;
  }
View Full Code Here

Examples of com.sissi.protocol.presence.Presence

*/
abstract class ToFansPresenceProcessor extends ProxyProcessor {

  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    Presence presence = new Presence();
    for (BlockListItem item : protocol.cast(Block.class).getItem()) {
      JID to = super.build(item.getJid());
      // From: 当前JID所有资源, To: Block.item.jid
      for (JID resource : super.resources(context.jid())) {
        super.broadcast(to, presence.setFrom(resource).clauses(this.build(context).clauses()));
      }
    }
    return true;
  }
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.