Package org.openmeetings.app.conference.whiteboard

Examples of org.openmeetings.app.conference.whiteboard.WhiteboardSyncLockObject


      IConnection current = Red5.getConnectionLocal();
      String streamid = current.getClient().getId();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(streamid);
      Long room_id = currentClient.getRoom_id();
     
      WhiteboardSyncLockObject wSyncLockObject = new WhiteboardSyncLockObject();
      wSyncLockObject.setAddtime(new Date());
      wSyncLockObject.setPublicSID(currentClient.getPublicSID());
      wSyncLockObject.setInitialLoaded(true);
     
      Map<String,WhiteboardSyncLockObject> syncListRoom = this.whiteBoardObjectListManager.getWhiteBoardSyncListByRoomid(room_id);
     

      wSyncLockObject.setCurrentLoadingItem(true);
      wSyncLockObject.setStarttime(new Date());
   
      syncListRoom.put(currentClient.getPublicSID(), wSyncLockObject);
      this.whiteBoardObjectListManager.setWhiteBoardSyncListByRoomid(room_id, syncListRoom);
     
      Collection<Set<IConnection>> conCollection = current.getScope().getConnections();
View Full Code Here


      RoomClient currentClient = this.clientListManager.getClientByStreamId(streamid);
      Long room_id = currentClient.getRoom_id();
     
      Map<String,WhiteboardSyncLockObject> syncListRoom = this.whiteBoardObjectListManager.getWhiteBoardSyncListByRoomid(room_id);

      WhiteboardSyncLockObject wSyncLockObject = syncListRoom.get(currentClient.getPublicSID());
     
      if (wSyncLockObject == null) {
        log.error("WhiteboardSyncLockObject not found for this Client "+syncListRoom);
        return;
      } else if (!wSyncLockObject.isCurrentLoadingItem()) {
        log.warn("WhiteboardSyncLockObject was not started yet "+syncListRoom);
        return;
      } else {
        syncListRoom.remove(currentClient.getPublicSID());
        this.whiteBoardObjectListManager.setWhiteBoardSyncListByRoomid(room_id, syncListRoom);
View Full Code Here

  }
 
  private int getNumberOfInitialLoaders(Map<String,WhiteboardSyncLockObject> syncListRoom) throws Exception {
    int number = 0;
    for (Iterator<String> iter = syncListRoom.keySet().iterator();iter.hasNext();) {
      WhiteboardSyncLockObject lockObject = syncListRoom.get(iter.next());
      if (lockObject.isInitialLoaded()){
        number++;
      }
    }
    return number;
  }
View Full Code Here

      IConnection current = Red5.getConnectionLocal();
      String streamid = current.getClient().getId();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(streamid);
      Long room_id = currentClient.getRoom_id();
     
      WhiteboardSyncLockObject wSyncLockObject = new WhiteboardSyncLockObject();
      wSyncLockObject.setAddtime(new Date());
      wSyncLockObject.setPublicSID(currentClient.getPublicSID());
      wSyncLockObject.setStarttime(new Date());
     
      Map<String,WhiteboardSyncLockObject> syncListImage = this.whiteBoardObjectListManager.getWhiteBoardObjectSyncListByRoomAndObjectId(room_id,object_id);
      syncListImage.put(currentClient.getPublicSID(), wSyncLockObject);
      this.whiteBoardObjectListManager.setWhiteBoardImagesSyncListByRoomAndObjectId(room_id, object_id, syncListImage);
     
View Full Code Here

     
      Map<String,WhiteboardSyncLockObject> syncListImage = this.whiteBoardObjectListManager.getWhiteBoardObjectSyncListByRoomAndObjectId(room_id,object_id);

      log.debug("sendCompletedObjectSyncEvent syncListImage: "+syncListImage);
     
      WhiteboardSyncLockObject wSyncLockObject = syncListImage.get(currentClient.getPublicSID());
     
      if (wSyncLockObject == null) {
        log.error("WhiteboardSyncLockObject not found for this Client "+currentClient.getPublicSID());
        log.error("WhiteboardSyncLockObject not found for this syncListImage "+syncListImage);
        return -2;
View Full Code Here

        log.debug("removeUserFromAllLists room_id: "+room_id);
       
        //Check Initial Loaders
        Map<String,WhiteboardSyncLockObject> syncListRoom = this.whiteBoardObjectListManager.getWhiteBoardSyncListByRoomid(room_id);
       
        WhiteboardSyncLockObject wSyncLockObject = syncListRoom.get(currentClient.getPublicSID());
       
        if (wSyncLockObject != null) {
          syncListRoom.remove(currentClient.getPublicSID());
        }
        this.whiteBoardObjectListManager.setWhiteBoardSyncListByRoomid(room_id, syncListRoom);
       
        int numberOfInitial = this.getNumberOfInitialLoaders(syncListRoom);
       
        log.debug("scope "+scope);

       
        if (numberOfInitial==0 && scope != null){
          Collection<Set<IConnection>> conCollection = scope.getConnections();
          for (Set<IConnection> conset : conCollection) {
            for (IConnection conn : conset) {
              if (conn != null) {
                if (conn instanceof IServiceCapableConnection) {
                  RoomClient rcl = this.clientListManager.getClientByStreamId(conn.getClient().getId());
                  if (rcl != null) {
                    if (rcl.getIsScreenClient() != null && rcl.getIsScreenClient()) {
                        //continue;
                      } else {
                      if (!rcl.getPublicSID().equals(currentClient.getPublicSID())) {
                        //do not send to current
                        ((IServiceCapableConnection) conn).invoke("sendSyncCompleteFlag", new Object[] { wSyncLockObject },this);
                      }
                    }
                  }
                }
              }   
            }
          } 
        }
       
       
        //Check Image Loaders
        Map<String,Map<String,WhiteboardSyncLockObject>> syncListRoomImages = this.whiteBoardObjectListManager.getWhiteBoardObjectSyncListByRoomid(room_id);
       
        for (Iterator<String> iter = syncListRoomImages.keySet().iterator();iter.hasNext();) {
          String object_id = iter.next();
          Map<String,WhiteboardSyncLockObject> syncListImages = syncListRoomImages.get(object_id);
          WhiteboardSyncLockObject wImagesSyncLockObject = syncListImages.get(currentClient.getPublicSID());
          if (wImagesSyncLockObject != null) {
            syncListImages.remove(currentClient.getPublicSID());
          }
          this.whiteBoardObjectListManager.setWhiteBoardImagesSyncListByRoomAndObjectId(room_id, object_id, syncListImages);
        }
View Full Code Here

      String streamid = current.getClient().getId();
      RoomClient currentClient = this.clientListManager
          .getClientByStreamId(streamid);
      Long room_id = currentClient.getRoom_id();

      WhiteboardSyncLockObject wSyncLockObject = new WhiteboardSyncLockObject();
      wSyncLockObject.setAddtime(new Date());
      wSyncLockObject.setPublicSID(currentClient.getPublicSID());
      wSyncLockObject.setInitialLoaded(true);

      Map<String, WhiteboardSyncLockObject> syncListRoom = this.whiteBoardObjectListManager
          .getWhiteBoardSyncListByRoomid(room_id);

      wSyncLockObject.setCurrentLoadingItem(true);
      wSyncLockObject.setStarttime(new Date());

      syncListRoom.put(currentClient.getPublicSID(), wSyncLockObject);
      this.whiteBoardObjectListManager.setWhiteBoardSyncListByRoomid(
          room_id, syncListRoom);
     
View Full Code Here

      Long room_id = currentClient.getRoom_id();

      Map<String, WhiteboardSyncLockObject> syncListRoom = this.whiteBoardObjectListManager
          .getWhiteBoardSyncListByRoomid(room_id);

      WhiteboardSyncLockObject wSyncLockObject = syncListRoom
          .get(currentClient.getPublicSID());

      if (wSyncLockObject == null) {
        log.error("WhiteboardSyncLockObject not found for this Client "
            + syncListRoom);
        return;
      } else if (!wSyncLockObject.isCurrentLoadingItem()) {
        log.warn("WhiteboardSyncLockObject was not started yet "
            + syncListRoom);
        return;
      } else {
        syncListRoom.remove(currentClient.getPublicSID());
View Full Code Here

      Map<String, WhiteboardSyncLockObject> syncListRoom)
      throws Exception {
    int number = 0;
    for (Iterator<String> iter = syncListRoom.keySet().iterator(); iter
        .hasNext();) {
      WhiteboardSyncLockObject lockObject = syncListRoom.get(iter.next());
      if (lockObject.isInitialLoaded()) {
        number++;
      }
    }
    return number;
  }
View Full Code Here

      String streamid = current.getClient().getId();
      RoomClient currentClient = this.clientListManager
          .getClientByStreamId(streamid);
      Long room_id = currentClient.getRoom_id();

      WhiteboardSyncLockObject wSyncLockObject = new WhiteboardSyncLockObject();
      wSyncLockObject.setAddtime(new Date());
      wSyncLockObject.setPublicSID(currentClient.getPublicSID());
      wSyncLockObject.setStarttime(new Date());

      Map<String, WhiteboardSyncLockObject> syncListImage = this.whiteBoardObjectListManager
          .getWhiteBoardObjectSyncListByRoomAndObjectId(room_id,
              object_id);
      syncListImage.put(currentClient.getPublicSID(), wSyncLockObject);
View Full Code Here

TOP

Related Classes of org.openmeetings.app.conference.whiteboard.WhiteboardSyncLockObject

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.