Package com.goodow.realtime.store

Examples of com.goodow.realtime.store.Collaborator.sessionId()


    collaborators.forEach(new ListIterator<JsonObject>() {
      @Override
      public void call(int index, JsonObject obj) {
        boolean isMe = store.getBus().getSessionId().equals(obj.getString("sessionId"));
        Collaborator collaborator = new CollaboratorImpl(obj.set(Key.IS_ME, isMe));
        document.collaborators.set(collaborator.sessionId(), collaborator);
      }
    });

    if (components != null && components.length() > 0) {
      final CollaborativeTransformer transformer = new CollaborativeTransformer();
View Full Code Here


    if (getClass() != obj.getClass()) {
      return false;
    }
    Collaborator other = (Collaborator) obj;
    if (sessionId == null) {
      if (other.sessionId() != null) {
        return false;
      }
    } else if (!sessionId.equals(other.sessionId())) {
      return false;
    }
View Full Code Here

    Collaborator other = (Collaborator) obj;
    if (sessionId == null) {
      if (other.sessionId() != null) {
        return false;
      }
    } else if (!sessionId.equals(other.sessionId())) {
      return false;
    }
    if (userId == null) {
      if (other.userId() != null) {
        return false;
View Full Code Here

          @Override
          public void handle(Message<JsonObject> message) {
            JsonObject body = message.body().set(Key.IS_ME, false);
            Collaborator collaborator = new CollaboratorImpl(body);
            boolean isJoined = !body.has(Key.IS_JOINED) || body.getBoolean(Key.IS_JOINED);
            String sessionId = collaborator.sessionId();
            if (isJoined) {
              if (!collaborators.has(sessionId)) {
                collaborators.set(sessionId, collaborator);
                model.bridge.store.getBus().publishLocal(
                    Constants.Topic.STORE + "/" + model.bridge.id + "/"
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.