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

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


          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);
        }
       
        int numberOfImageLoaders = this.whiteBoardObjectListManager.getWhiteBoardObjectSyncListByRoomid(room_id).size();
       
        if (numberOfImageLoaders==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.getIsScreenClient() != null && rcl.getIsScreenClient()) {
                      //continue;
                    } else {
                    if (rcl != null) {
                      ((IServiceCapableConnection) conn).invoke("sendImagesSyncCompleteFlag", new Object[] { "remove" },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) {
        throw new Exception("Could not Find RoomClient on List publicSID: "+publicSID);
      }
      //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());
              if (rcl != null) {
                if (rcl.getIsScreenClient() != null && rcl.getIsScreenClient()) {
                    //continue;
                  } else {
                  //log.debug("rcl "+rcl+" rcl.getUser_id(): "+rcl.getPublicSID()+" publicSID: "+publicSID+ " IS EQUAL? "+rcl.getPublicSID().equals(publicSID));
                  if (rcl.getPublicSID().equals(publicSID)){
                    //log.debug("IS EQUAL ");
                    ((IServiceCapableConnection) conn).invoke("newMessageByRoomAndDomain",new Object[] { message }, this);
                    log.debug("newMessageByRoomAndDomain RPC:newMessageByRoomAndDomain"+message);
                  }
                }
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) {
        currentClient = this.clientListManager.getClientByUserId(user_id);
      }
     
      Collection<Set<IConnection>> conCollection = null;
     
      if (currentClient == null) {
        //Must be from a previous session, search for user in current scope
        IConnection current = Red5.getConnectionLocal();
        //Notify all Clients of that Scope (Room)
        conCollection = current.getScope().getConnections();
      else {
        //default Scope Name
        String scopeName = "hibernate";
        if (currentClient.getRoom_id() != null) {
          scopeName = currentClient.getRoom_id().toString();
        }
       
        IScope scopeHibernate = webAppKeyScope.getScope(scopeName);
       
        if (scopeHibernate!=null){
          conCollection = webAppKeyScope.getScope(scopeName).getConnections();
        }
      }
     
     
      //log.debug("scopeHibernate "+scopeHibernate);
     
      //Notify the clients of the same scope (room) with user_id
     
     
      for (Set<IConnection> conset : conCollection) {
        for (IConnection conn : conset) {
          if (conn != null) {
            RoomClient rcl = this.clientListManager.getClientByStreamId(conn.getClient().getId());
            if (rcl != null) {
              if (rcl.getIsScreenClient() != null && rcl.getIsScreenClient()) {
                  //continue;
                } else {
                //log.debug("rcl "+rcl+" rcl.getUser_id(): "+rcl.getPublicSID()+" publicSID: "+publicSID+ " IS EQUAL? "+rcl.getPublicSID().equals(publicSID));
                if (rcl.getPublicSID().equals(publicSID)){
                  //log.debug("IS EQUAL ");
                  ((IServiceCapableConnection) conn).invoke("newMessageByRoomAndDomain",new Object[] { message }, this);
                  log.debug("sendMessageWithClientByPublicSID RPC:newMessageByRoomAndDomain"+message);
                } else if (user_id != 0 && rcl.getUser_id() != null && rcl.getUser_id().equals(user_id)) {
                  ((IServiceCapableConnection) conn).invoke("newMessageByRoomAndDomain",new Object[] { message }, this);
                  log.debug("sendMessageWithClientByPublicSID RPC:newMessageByRoomAndDomain"+message);
                }
              }
            }
View Full Code Here

      Collection<Set<IConnection>> conCollection = current.getScope().getConnections();
      for (Set<IConnection> conset : conCollection) {
        for (IConnection conn : conset) {
          if (conn != null) {
           
            RoomClient rcl = this.clientListManager.getClientByStreamId(conn.getClient().getId());
           
            if (rcl.getIsRecording() != null && rcl.getIsRecording()) {
              return true;
            }
           
          }
        }
View Full Code Here

      Collection<Set<IConnection>> conCollection = current.getScope().getConnections();
      for (Set<IConnection> conset : conCollection) {
        for (IConnection conn : conset) {
          if (conn != null) {
           
            RoomClient rcl = this.clientListManager.getClientByStreamId(conn.getClient().getId());
           
            if (rcl.getIsRecording() != null && rcl.getIsRecording()) {
              return false;
            }
           
          }
        }
      }
     
     
     
      RoomClient current_rcl = this.clientListManager.getClientByStreamId(current.getClient().getId());
     
      //String publicSID = current_rcl.getPublicSID();
     
      //Also set the Recording Flag to Record all Participants that enter later
      current_rcl.setIsRecording(true);
      this.clientListManager.updateClientByStreamId(current.getClient().getId(), current_rcl);
     
     
      Map<String,String> interviewStatus = new HashMap<String,String>();
      interviewStatus.put("action", "start");
View Full Code Here

      Collection<Set<IConnection>> conCollection = current.getScope().getConnections();
      for (Set<IConnection> conset : conCollection) {
        for (IConnection conn : conset) {
          if (conn != null) {
           
            RoomClient rcl = this.clientListManager.getClientByStreamId(conn.getClient().getId());
           
            if (rcl == null) {
              //continue;
            } else if (rcl.getIsScreenClient() != null && rcl.getIsScreenClient()) {
             
              if (rcl.getStreamid() != null && rcl.getStreamid().equals(streamid)) {
                //log.debug("IS EQUAL ");
                ((IServiceCapableConnection) conn).invoke("sendRemoteCursorEvent",new Object[] { messageObj }, this);
                log.debug("sendRemoteCursorEvent messageObj"+messageObj);
              }
             
View Full Code Here

      Collection<Set<IConnection>> conCollection = current.getScope().getConnections();
      for (Set<IConnection> conset : conCollection) {
        for (IConnection conn : conset) {
          if (conn != null) {
           
            RoomClient rcl = this.clientListManager.getClientByStreamId(conn.getClient().getId());
           
            if (rcl.getIsRecording() != null && rcl.getIsRecording()) {
             
              rcl.setIsRecording(false);
             
              flvRecordingId = rcl.getFlvRecordingId();
             
              rcl.setFlvRecordingId(null);
             
              //Reset the Recording Flag to Record all Participants that enter later
              this.clientListManager.updateClientByStreamId(conn.getClient().getId(), rcl);
             
              found = true;
            }
           
          }
        }
      }
     
      if (!found) {
        return false;
      }
     
      RoomClient currentClient = this.clientListManager.getClientByStreamId(current.getClient().getId());
     
     
      this.flvRecorderService.stopRecordAndSave(scope, currentClient, flvRecordingId);
     
      Map<String,String> interviewStatus = new HashMap<String,String>();
View Full Code Here

   */
  public synchronized HashMap<String,RoomClient> getClientListScope(){
    HashMap <String,RoomClient> roomClientList = new HashMap<String,RoomClient>();
    try {
      IConnection current = Red5.getConnectionLocal();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(current.getClient().getId());
      log.debug("xmlcrm getClientListScope: "+currentClient.getUsername());     
      Long room_id = currentClient.getRoom_id()
             
      return this.clientListManager.getClientListByRoom(room_id);
     
    } catch (Exception err) {
      log.debug("[getClientListScope]",err);
View Full Code Here

     
      IConnection currentcon = Red5.getConnectionLocal();

     
      HashMap<String,RoomClient> ClientList = this.clientListManager.getClientList();
      RoomClient rc = ClientList.get(currentcon.getClient().getId());
     
      Long uniqueRoomPollName = rc.getRoom_id();
     
      log.debug("rc: "+rc.getStreamid()+" "+rc.getUsername()+" "+rc.getIsMod());
     
      if (rc.getIsMod()){
        RoomPoll roomP = new RoomPoll();
       
        roomP.setCreatedBy(rc);
        roomP.setPollDate(new Date());
        roomP.setPollQuestion(pollQuestion);
        roomP.setPollTypeId(pollTypeId);
        roomP.setRoom_id(rc.getRoom_id());
        List<RoomPollAnswers> rpA = new LinkedList<RoomPollAnswers>();
        roomP.setRoomPollAnswerList(rpA);
       
        pollList.put(uniqueRoomPollName, roomP);
       
View Full Code Here

    }
  }
 
  public void sendNotification(IConnection current,String clientFunction, Object[]obj) throws Exception{
    //Notify all clients of the same scope (room)
    RoomClient rc = this.clientListManager.getClientByStreamId(current.getClient().getId());
    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 (rcl.getRoom_id().equals(rc.getRoom_id()) && rcl.getRoom_id()!=null){
                ((IServiceCapableConnection) conn).invoke(clientFunction,obj,ScopeApplicationAdapter.getInstance());
                log.debug("sending "+clientFunction+" to " + conn+" "+conn.getClient().getId());
              }
            }
          }
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.