Package org.openmeetings.app.persistence.beans.recording

Examples of org.openmeetings.app.persistence.beans.recording.RoomClient


  }
 
  public synchronized RoomClient getClientByPublicSID(String publicSID) {
    try {
      for (Iterator<String> iter = clientList.keySet().iterator();iter.hasNext();) {
        RoomClient rcl = clientList.get(iter.next());
        if (rcl.getPublicSID().equals(publicSID)) {
          return rcl;
        }
      }
    } catch (Exception err) {
      log.error("[getClientByPublicSID]",err);
View Full Code Here


  }
 
  public synchronized RoomClient getClientByUserId(Long userId) {
    try {
      for (Iterator<String> iter = clientList.keySet().iterator();iter.hasNext();) {
        RoomClient rcl = clientList.get(iter.next());
        if (rcl.getUser_id().equals(userId)) {
          return rcl;
        }
      }
    } catch (Exception err) {
      log.error("[getClientByPublicSID]",err);
View Full Code Here

    HashMap <String,RoomClient> roomClientList = new HashMap<String,RoomClient>();
    try {     
      for (Iterator<String> iter=clientList.keySet().iterator();iter.hasNext();) {
        String key = (String) iter.next();
        //log.debug("getClientList key: "+key);
        RoomClient rcl = clientList.get(key);
        //same room, same domain
        if (room_id!=null && room_id.equals(rcl.getRoom_id())) {
          if (rcl.getIsScreenClient() != null && rcl.getIsScreenClient()) {
            //continue
          } else {
            roomClientList.put(key, rcl);
          }
        }
View Full Code Here

    HashMap <String,RoomClient> roomClientList = new HashMap<String,RoomClient>();
    try {     
      for (Iterator<String> iter=clientList.keySet().iterator();iter.hasNext();) {
        String key = (String) iter.next();
        //log.debug("getClientList key: "+key);
        RoomClient rcl = clientList.get(key);
       
        if (rcl.getRoom_id() != null && rcl.getRoom_id().equals(room_id)) {
          //same room
          roomClientList.put(key, rcl);
        }
      }
    } catch (Exception err) {
View Full Code Here

   
    List<RoomClient> rclList = new LinkedList<RoomClient>();
   
    for (Iterator<String> iter=clientList.keySet().iterator();iter.hasNext();) {
      String key = (String) iter.next();
      RoomClient rcl = clientList.get(key);
//     
      log.debug("*..*unsetModerator ClientList key: "+rcl.getStreamid());
//     
      //Check if the Client is in the same room
      if(room_id !=null && room_id.equals(rcl.getRoom_id()) && rcl.getIsMod()){
        log.debug("found client who is the Moderator: "+rcl);
        rclList.add(rcl);
      }       
    }
   
View Full Code Here

     try {
       Long users_id = Sessionmanagement.getInstance().checkSession(SID);
       Long user_level = Usermanagement.getInstance().getUserLevelByID(users_id);
       // admins only
       if (AuthLevelmanagement.getInstance().checkAdminLevel(user_level)) {
         RoomClient rcl = this.clientListManager.getClientByStreamId(streamid);
        
         if (rcl == null) {
           return true;
         }
         String scopeName = "hibernate";
         if (rcl.getRoom_id() != null) {
           scopeName = rcl.getRoom_id().toString();
         }
         IScope currentScope = this.scopeApplicationAdapter.getRoomScope(scopeName);
         this.scopeApplicationAdapter.roomLeaveByScope(rcl, currentScope);
        
        
View Full Code Here

        Long users_id = Sessionmanagement.getInstance().checkSession(SID);
        Long user_level = Usermanagement.getInstance().getUserLevelByID(users_id);
        // users only
        if (AuthLevelmanagement.getInstance().checkUserLevel(user_level)) {
         
          RoomClient rcl = this.clientListManager.getClientByPublicSID(publicSID);
         
          if (rcl == null) {
            return true;
          }
          String scopeName = "hibernate";
          if (rcl.getRoom_id() != null) {
            scopeName = rcl.getRoom_id().toString();
          }
          IScope currentScope = this.scopeApplicationAdapter.getRoomScope(scopeName);
         
          HashMap<Integer,String> messageObj = new HashMap<Integer,String>();
          messageObj.put(0, "kick");
         
          this.scopeApplicationAdapter.sendMessageById(messageObj, rcl.getStreamid(), currentScope);
         
         
          this.scopeApplicationAdapter.roomLeaveByScope(rcl, currentScope);
         
          return true;
View Full Code Here

 

  public boolean checkSharerSession() {
    try {
      IConnection current = Red5.getConnectionLocal();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(current.getClient().getId());
     
      ServerSharingSessionBean serverSharingSessionBean = ServerSharingSessionList.getServerSharingSessionBeanByPublicSID(currentClient.getPublicSID());
     
      if (serverSharingSessionBean == null) {
        return true;
      } else if (serverSharingSessionBean.isDeleted()) {
        return true;
View Full Code Here

     
      log.debug("sendCompletedObjectSyncEvent: "+object_id);
     
      IConnection current = Red5.getConnectionLocal();
      String streamid = current.getClient().getId();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(streamid);
      Long room_id = currentClient.getRoom_id();
     
      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;
       
      } else {
       
        log.debug("sendCompletedImagesSyncEvent remove: "+currentClient.getPublicSID());
       
        syncListImage.remove(currentClient.getPublicSID());
        this.whiteBoardObjectListManager.setWhiteBoardImagesSyncListByRoomAndObjectId(room_id, object_id, syncListImage);
       
        int numberOfInitial = this.whiteBoardObjectListManager.getWhiteBoardObjectSyncListByRoomid(room_id).size();
       
        log.debug("sendCompletedImagesSyncEvent numberOfInitial: "+numberOfInitial);
       
        if (numberOfInitial==0){
          int returnVal = 0;
          Collection<Set<IConnection>> conCollection = current.getScope().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.getIsScreenClient() != null && rcl.getIsScreenClient()) {
                      //continue;
                    } else {
                    if (room_id!=null && room_id.equals(rcl.getRoom_id())) {
                      returnVal++;
                      ((IServiceCapableConnection) conn).invoke("sendObjectSyncCompleteFlag", new Object[] { wSyncLockObject },this);
                    }
                  }
                }
View Full Code Here

      IScope webAppKeyScope = globalScope.getScope(ScopeApplicationAdapter.webAppRootKey);
     
      //log.debug("webAppKeyScope "+webAppKeyScope);
     
      //Get Room Id to send it to the correct Scope
      RoomClient currentClient = this.clientListManager.getClientByPublicSID(publicSID);
     
      if (currentClient == null) {
        return;
        //throw new Exception("Could not Find RoomClient on List");
      }
      //default Scope Name
      String scopeName = "hibernate";
      if (currentClient.getRoom_id() != null) {
        scopeName = currentClient.getRoom_id().toString();
      }
     
      IScope scopeHibernate = webAppKeyScope.getScope(scopeName);
     
      //log.debug("scopeHibernate "+scopeHibernate);
     
      if (scopeHibernate!=null){
        //Notify the clients of the same scope (room) with user_id
       
        Collection<Set<IConnection>> conCollection = webAppKeyScope.getScope(scopeName).getConnections();
        for (Set<IConnection> conset : conCollection) {
          for (IConnection conn : conset) {
            if (conn != null) {
             
              RoomClient rcl = this.clientListManager.getClientByStreamId(conn.getClient().getId());
              //log.debug("rcl "+rcl+" rcl.getUser_id(): "+rcl.getPublicSID()+" publicSID: "+publicSID+ " IS EQUAL? "+rcl.getPublicSID().equals(publicSID));
             
              if (rcl == null) {
                //continue;
              } else if (rcl.getIsScreenClient() != null && rcl.getIsScreenClient()) {
                  //continue;
                } else {
                //Send to self for debugging
                if (!rcl.getPublicSID().equals(publicSID) || true){
                  //log.debug("IS EQUAL ");
                  ((IServiceCapableConnection) conn).invoke("newScreenSharing",new Object[] { screenSharingMessage }, this);
                  log.debug("sendMessageWithClientByPublicSID RPC:newMessageByRoomAndDomain"+screenSharingMessage);
                }
              }
View Full Code Here

TOP

Related Classes of org.openmeetings.app.persistence.beans.recording.RoomClient

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.