Examples of RoomClient


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

    try {

      // Store the local so that we do not send notification to ourself back
      IConnection current = Red5.getConnectionLocal();
      String streamid = current.getClient().getId();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(streamid);
       
      if (currentClient == null) {
       
        //In case the client has already left(kicked) this message might be thrown later then the RoomLeave
        //event and the currentClient is already gone
        //The second Use-Case where the currentClient is maybe null is if we remove the client because its a Zombie/Ghost
       
        return;
       
      }
      // Notify all the clients that the stream had been started
      log.debug("sendClientBroadcastNotifications: "+ stream.getPublishedName());
      log.debug("sendClientBroadcastNotifications : "+ currentClient+ " " + currentClient.getStreamid());
     
      //Notify all clients of the same scope (room)
      Collection<Set<IConnection>> conCollection = current.getScope().getConnections();
      for (Set<IConnection> conset : conCollection) {
        for (IConnection conn : conset) {
          if (conn != null) {
            if (conn instanceof IServiceCapableConnection) {
              if (conn.equals(current)){
                //there is a Bug in the current implementation of the appDisconnect
                if (clientFunction.equals("closeStream")){
                  RoomClient rcl = this.clientListManager.getClientByStreamId(conn.getClient().getId());
                  if (clientFunction.equals("closeStream") && rcl.getIsRecording()){
                    log.debug("*** sendClientBroadcastNotifications Any Client is Recording - stop that");
                    //StreamService.stopRecordingShowForClient(conn, currentClient, rcl.getRoomRecordingName(), false);
                    this.flvRecorderService.stopRecordingShowForClient(conn, currentClient);
                  }
                  // Don't notify current client
                  current.ping();
                }
                continue;
              } else {
                RoomClient rcl = this.clientListManager.getClientByStreamId(conn.getClient().getId());
                if (rcl != null){
                  if (rcl.getIsScreenClient() != null && rcl.getIsScreenClient()) {
                      //continue;
                    } else {
                    log.debug("is this users still alive? :"+rcl);
                    //conn.ping();
                    IServiceCapableConnection iStream = (IServiceCapableConnection) conn;
                    //log.info("IServiceCapableConnection ID " + iStream.getClient().getId());
                    iStream.invoke(clientFunction,new Object[] { rc }, this);
                  }
                 
                  log.debug("sending notification to " + conn+" ID: ");
       
                  //if this close stream event then stop the recording of this stream
                  if (clientFunction.equals("closeStream") && rcl.getIsRecording()){
                    log.debug("***  +++++++ ######## sendClientBroadcastNotifications Any Client is Recording - stop that");
                    //StreamService.stopRecordingShowForClient(conn, currentClient, rcl.getRoomRecordingName(), false);
                    this.flvRecorderService.stopRecordingShowForClient(conn, currentClient);
                  }
                }
View Full Code Here

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

      log.debug("*..*addModerator publicSID: " + publicSID);
     
      IConnection current = Red5.getConnectionLocal();
      //String streamid = current.getClient().getId();
     
      RoomClient currentClient = this.clientListManager.getClientByPublicSID(publicSID);
     
      if (currentClient == null) {
        return -1L;
      }
      Long room_id = currentClient.getRoom_id();
     
      currentClient.setIsMod(true);
      //Put the mod-flag to true for this client
      this.clientListManager.updateClientByStreamId(currentClient.getStreamid(), currentClient);
     
      List<RoomClient> currentMods = this.clientListManager.getCurrentModeratorByRoom(room_id);
     
      //Notify all clients of the same scope (room)
      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 (conn instanceof IServiceCapableConnection) {
              if (rcl.getIsScreenClient() != null && rcl.getIsScreenClient()) {
                  //continue;
                } else {
                ((IServiceCapableConnection) conn).invoke("setNewModeratorByList",new Object[] { currentMods }, this);
                log.debug("sending setNewModeratorByList to " + conn);
              }
View Full Code Here

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

  public void setNewCursorPosition(Object item) {
    try {
     
      IConnection current = Red5.getConnectionLocal();
      String streamid = current.getClient().getId();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(streamid);
     
      //log.debug("[setNewCursorPosition]"+item);
     
      Map cursor = (Map) item;
      cursor.put("streamPublishName",currentClient.getStreamPublishName());
     
      //log.debug("[setNewCursorPosition x]"+cursor.get("cursor_x"));
      //log.debug("[setNewCursorPosition y]"+cursor.get("cursor_y"));
      //log.debug("[setNewCursorPosition publicSID]"+cursor.get("publicSID"));
     
      //Notify all users of the same Scope
      Collection<Set<IConnection>> conCollection = current.getScope().getConnections();
      for (Set<IConnection> conset : conCollection) {
        for (IConnection conn : conset) {
          if (conn != null) {
            if (conn instanceof IServiceCapableConnection) {
              if (conn.equals(current)){
                continue;
              } else {
                RoomClient rcl = this.clientListManager.getClientByStreamId(conn.getClient().getId());
                if (rcl == null) {
                  //continue;
                } else if (rcl.getIsScreenClient() != null && rcl.getIsScreenClient()) {
                    //continue;
                  } else {
                  //log.debug("is this users still alive? :"+rcl);
                  //Check if the Client is in the same room and same domain
                  IServiceCapableConnection iStream = (IServiceCapableConnection) conn;
View Full Code Here

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

      log.debug("*..*addModerator publicSID: " + publicSID);
     
      IConnection current = Red5.getConnectionLocal();
      //String streamid = current.getClient().getId();
     
      RoomClient currentClient = this.clientListManager.getClientByPublicSID(publicSID);
     
      if (currentClient == null) {
        return -1L;
      }
      Long room_id = currentClient.getRoom_id();
     
      currentClient.setIsMod(false);
      //Put the mod-flag to true for this client
      this.clientListManager.updateClientByStreamId(currentClient.getStreamid(), currentClient);
     
      List<RoomClient> currentMods = this.clientListManager.getCurrentModeratorByRoom(room_id);
     
      //Notify all clients of the same scope (room)
      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()) {
                //continue;
              } else {
              log.debug("Send Flag to Client: "+rcl.getUsername());
              if (conn instanceof IServiceCapableConnection) {
                ((IServiceCapableConnection) conn).invoke("setNewModeratorByList",new Object[] { currentMods }, this);
                log.debug("sending setNewModeratorByList to " + conn);
              }
            }
View Full Code Here

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

      log.debug("*..*setBroadCastingFlag publicSID: " + publicSID);
     
      IConnection current = Red5.getConnectionLocal();
      //String streamid = current.getClient().getId();
     
      RoomClient currentClient = this.clientListManager.getClientByPublicSID(publicSID);
     
      if (currentClient == null) {
        return -1L;
      }
     
      currentClient.setIsBroadcasting(value);
      currentClient.setInterviewPodId(interviewPodId);
     
      //Put the mod-flag to true for this client
      this.clientListManager.updateClientByStreamId(currentClient.getStreamid(), currentClient);
     
      //Notify all clients of the same scope (room)
      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()) {
                //continue;
              } else {
              log.debug("Send Flag to Client: "+rcl.getUsername());
              if (conn instanceof IServiceCapableConnection) {
                ((IServiceCapableConnection) conn).invoke("setNewBroadCastingFlag",new Object[] { currentClient }, this);
                log.debug("sending setNewBroadCastingFlag to " + conn);
              }
            }
View Full Code Here

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

    try {
     
      IConnection current = Red5.getConnectionLocal();
      //String streamid = current.getClient().getId();
     
      RoomClient currentClient = this.clientListManager.getClientByPublicSID(publicSID);
     
      List<RoomClient> currentModList = this.clientListManager.getCurrentModeratorByRoom(currentClient.getRoom_id());
     
      if (currentModList.size() > 0) {
        return 2L;
      } else {
        //No moderator in this room at the moment
        Rooms room = Roommanagement.getInstance().getRoomById(currentClient.getRoom_id());
       
        if (room.getIsModeratedRoom()) {
          return 3L;
        } else {
          return 1L;
View Full Code Here

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

   */
  public synchronized long getBroadCastId(){
    try {
      IConnection current = Red5.getConnectionLocal();
      String streamid = current.getClient().getId();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(streamid);
      currentClient.setBroadCastID(broadCastCounter++);
      this.clientListManager.updateClientByStreamId(streamid, currentClient);
      return currentClient.getBroadCastID();
    } catch (Exception err){
      log.error("[getBroadCastId]",err);
    }
    return -1;
  }
View Full Code Here

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

  public synchronized RoomClient setUserAVSettings(String avsettings, Object newMessage){
    try {

      IConnection current = Red5.getConnectionLocal();
      String streamid = current.getClient().getId();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(streamid);
      currentClient.setAvsettings(avsettings);
      Long room_id = currentClient.getRoom_id();         
      this.clientListManager.updateClientByStreamId(streamid, currentClient);
     
      HashMap<String,Object> hsm = new HashMap<String,Object>();
      hsm.put("client", currentClient);
      hsm.put("message", newMessage);     
     
      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 == null) {
                //continue;
              } else if (rcl.getIsScreenClient() != null && rcl.getIsScreenClient()) {
                  //continue;
                } else {
                ((IServiceCapableConnection) conn).invoke("sendVarsToMessageWithClient",new Object[] { hsm }, this);
                log.debug("sending setUserObjectNewOneFour to " + conn);
               
View Full Code Here

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

      //Return Object
      RoomStatus roomStatus = new RoomStatus();

      IConnection current = Red5.getConnectionLocal();
      String streamid = current.getClient().getId();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(streamid);
      currentClient.setRoom_id(room_id);
      currentClient.setRoomEnter(new Date());
      currentClient.setOrganization_id(organization_id);
     
      currentClient.setUsercolor(colorObj);
     
      //Inject externalUserId if nothing is set yet
      if (currentClient.getExternalUserId() == null) {
        Users us = UsersDaoImpl.getInstance().getUser(currentClient.getUser_id());
        if (us != null) {
          currentClient.setExternalUserId(us.getExternalUserId());
          currentClient.setExternalUserType(us.getExternalUserType());
        }
      }
     
      //This can be set without checking for Moderation Flag
      currentClient.setIsSuperModerator(isSuperModerator);
     
      this.clientListManager.updateClientByStreamId(streamid, currentClient);
     
     
      //Log the User
      ConferenceLogDaoImpl.getInstance().addConferenceLog("roomEnter", currentClient.getUser_id(),
          streamid, room_id, currentClient.getUserip(), "",
          currentClient.getExternalUserId(), currentClient.getExternalUserType(),
          currentClient.getMail(),currentClient.getFirstname(),currentClient.getLastname()
          );
     
      log.debug("##### setRoomValues : " + currentClient.getUsername()+" "+currentClient.getStreamid()); // just a unique number

      //Check for Moderation
      //LogicalRoom ENTER
      HashMap<String,RoomClient> clientListRoom = this.getRoomClients(room_id);
     
     
      // appointed meeting or moderated Room?
      Rooms room = Roommanagement.getInstance().getRoomById(room_id);
     
      //Check Max Users first
      if (room.getNumberOfPartizipants() != null && clientListRoom.size() > room.getNumberOfPartizipants()) {
        roomStatus.setRoomFull(true);
        return roomStatus;
      }
     
      // not really - default logic
      if(room.getAppointment() == null || room.getAppointment() == false){
       
        if (room.getIsModeratedRoom()) {
         
          //if this is a Moderated Room then the Room can be only locked off by the Moderator Bit
          //List<RoomClient> clientModeratorListRoom = this.clientListManager.getCurrentModeratorByRoom(room_id);
         
          //If there is no Moderator yet we have to check if the current User has the Bit set to true to
          //become one, otherwise he won't get Moderation and has to wait
          if (becomeModerator) {
            currentClient.setIsMod(true);
           
            //There is a need to send an extra Event here, cause at this moment there could be
            //already somebody in the Room waiting
           
            //Update the Client List
            this.clientListManager.updateClientByStreamId(streamid, currentClient);
           
            List<RoomClient> modRoomList = this.clientListManager.getCurrentModeratorByRoom(currentClient.getRoom_id());
           
            //Notify all clients of the same scope (room)
            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()) {
                      //continue;
                    } else {
                    if( !streamid.equals(rcl.getStreamid())){
                      //It is not needed to send back that event to the actuall Moderator
                      //as it will be already triggered in the result of this Function
                      //in the Client
                      if (conn instanceof IServiceCapableConnection) {
                        ((IServiceCapableConnection) conn).invoke("setNewModeratorByList",new Object[] { modRoomList }, this);
                        log.debug("sending setNewModeratorByList to " + conn);
                      }
                    }
                  }
                }
              } 
            }
           
          } else {
            //The current User is not a Teacher/Admin or whatever Role that should get the
            //Moderation
            currentClient.setIsMod(false);
          }
       
           
        } else {
         
          //If this is a normal Room Moderator rules : first come, first draw ;-)
          log.debug("setRoomValues : Room" + room_id + " not appointed! Moderator rules : first come, first draw ;-)" );
          if (clientListRoom.size()==1){
            log.debug("Room is empty so set this user to be moderation role");
            currentClient.setIsMod(true);
          } else {
            log.debug("Room is already somebody so set this user not to be moderation role");
           
            if (becomeModerator) {
              currentClient.setIsMod(true);
             
              //Update the Client List
              this.clientListManager.updateClientByStreamId(streamid, currentClient);
             
              List<RoomClient> modRoomList = this.clientListManager.getCurrentModeratorByRoom(currentClient.getRoom_id());
             
              //There is a need to send an extra Event here, cause at this moment there could be
              //already somebody in the Room waiting
             
              //Notify all clients of the same scope (room)
              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()) {
                        //continue;
                      } else {
                      if( !streamid.equals(rcl.getStreamid())){
                        //It is not needed to send back that event to the actual Moderator
                        //as it will be already triggered in the result of this Function
                        //in the Client
                        if (conn instanceof IServiceCapableConnection) {
                          ((IServiceCapableConnection) conn).invoke("setNewModeratorByList",new Object[] { modRoomList }, this);
                          log.debug("sending setNewModeratorByList to " + conn);
                        }
                      }
                    }
                  }
                } 
              }
             
            } else {
              //The current User is not a Teacher/Admin or whatever Role that should get the
              //Moderation
              currentClient.setIsMod(false);
            }
           
          }
         
        }
       
        //Update the Client List
        this.clientListManager.updateClientByStreamId(streamid, currentClient);
       
      } else{
       
        //If this is an Appointment then the Moderator will be set to the Invitor
       
        Appointment ment = AppointmentLogic.getInstance().getAppointmentByRoom(room_id);
       
        List<MeetingMember> members = MeetingMemberDaoImpl.getInstance().getMeetingMemberByAppointmentId(ment.getAppointmentId());
       
        Long userIdInRoomClient = currentClient.getUser_id();
       
        boolean found = false;
        boolean moderator_set = false;
       
        // Check if current user is set to moderator
        for(int i = 0; i< members.size(); i++)
        {
          MeetingMember member = members.get(i);         
         
          // only persistent users can schedule a meeting
          // userid is only set for registered users
          if(member.getUserid() != null )
          {
            log.debug("checking user " + member.getFirstname() + " for moderator role - ID : " + member.getUserid().getUser_id());
           
            if ( member.getUserid().getUser_id().equals(userIdInRoomClient) )
            {         
              found = true;
             
              if(member.getInvitor()){
                log.debug("User " + userIdInRoomClient + " is moderator due to flag in MeetingMember record");
                currentClient.setIsMod(true);
               
                //Update the Client List
                this.clientListManager.updateClientByStreamId(streamid, currentClient);
               
                List<RoomClient> modRoomList = this.clientListManager.getCurrentModeratorByRoom(currentClient.getRoom_id());
               
                //There is a need to send an extra Event here, cause at this moment there could be
                //already somebody in the Room waiting
               
                //Notify all clients of the same scope (room)
                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()) {
                          //continue;
                        } else {
                        if( !streamid.equals(rcl.getStreamid())){
                          //It is not needed to send back that event to the actual Moderator
                          //as it will be already triggered in the result of this Function
                          //in the Client
                          if (conn instanceof IServiceCapableConnection) {
                            ((IServiceCapableConnection) conn).invoke("setNewModeratorByList",new Object[] { modRoomList }, this);
                            log.debug("sending setNewModeratorByList to " + conn);
                          }
                        }
                      }
                    }
                  } 
                }
               
                moderator_set = true;
                this.clientListManager.updateClientByStreamId(streamid, currentClient);
                break;
              }
              else
              {
                log.debug("User " + userIdInRoomClient + " is NOT moderator due to flag in MeetingMember record");
                currentClient.setIsMod(false);
                this.clientListManager.updateClientByStreamId(streamid, currentClient);
                break;
              }
            }
            else
            {
              if(member.getInvitor())
                moderator_set = true;
            }             
          }
          else
          {
            if(member.getInvitor())
              moderator_set = true;
          }
         
        }
       
        if(!found){
          log.debug("User " + userIdInRoomClient + " could not be found as MeetingMember -> definiteley no moderator");
          currentClient.setIsMod(false);
          this.clientListManager.updateClientByStreamId(streamid, currentClient);
        }
        else{
          // if current user is part of the memberlist, but moderator couldn't be retrieved : first come, first draw!
          if (clientListRoom.size()==1 && moderator_set == false){
            log.debug("");
            currentClient.setIsMod(true);
           
            //Update the Client List
            this.clientListManager.updateClientByStreamId(streamid, currentClient);
           
            List<RoomClient> modRoomList = this.clientListManager.getCurrentModeratorByRoom(currentClient.getRoom_id());
           
            //There is a need to send an extra Event here, cause at this moment there could be
            //already somebody in the Room waiting
           
            //Notify all clients of the same scope (room)
            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()) {
                      //continue;
                    } else {
                    if( !streamid.equals(rcl.getStreamid())){
                      //It is not needed to send back that event to the actual Moderator
                      //as it will be already triggered in the result of this Function
                      //in the Client
                      if (conn instanceof IServiceCapableConnection) {
                        ((IServiceCapableConnection) conn).invoke("setNewModeratorByList",new Object[] { modRoomList }, this);
                        log.debug("sending setNewModeratorByList to " + conn);
                      }
                    }
                  }
                }
              } 
            }
           
            this.clientListManager.updateClientByStreamId(streamid, currentClient);
          }
        }
       
      }
     
     
      //Notify all clients of the same scope (room)
      Collection<Set<IConnection>> conCollection = current.getScope().getConnections();
      for (Set<IConnection> conset : conCollection) {
        for (IConnection conn : conset) {
          if (conn != null) {
            if (conn instanceof IServiceCapableConnection) {
              if (conn.equals(current)){
                continue;
              } else {       
                RoomClient rcl = this.clientListManager.getClientByStreamId(conn.getClient().getId());
                if (rcl == null) {
                  //continue;
                } else if (rcl.getIsScreenClient() != null && rcl.getIsScreenClient()) {
                    //continue;
                  } else {
                  //log.debug("*** setAudienceModus Found Client to " + conn);
                  //log.debug("*** setAudienceModus Found Client to " + conn.getClient());
                  if (conn instanceof IServiceCapableConnection) {
View Full Code Here

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

   * @return
   */
  public int sendMessageWithClient(Object newMessage) {
    try {
      IConnection current = Red5.getConnectionLocal();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(current.getClient().getId());
      Long room_id = currentClient.getRoom_id();
     
      log.debug("room_id: "+room_id);
      log.debug("currentClient.getIsChatNotification(): "+currentClient.getIsChatNotification());
      if (currentClient.getIsChatNotification()){
        room_id = currentClient.getChatUserRoomId();
      }
     
      //log.error(newMessage.getClass().getName());
      ArrayList messageMap = (ArrayList) newMessage;
      //adding delimiter space, cause otherwise an emoticon in the last string would not be found
      String messageText = messageMap.get(4).toString()+" ";
      //log.error("messageText"+messageText);
      //add server time
      messageMap.set(1,parseDateAsTimeString());
      LinkedList<String[]> parsedStringObjects = ChatString.getInstance().parseChatString(messageText);
      //log.error("parsedStringObjects"+parsedStringObjects.size());
      log.debug("size:"+messageMap.size());
      messageMap.add(parsedStringObjects);
      newMessage = messageMap;     
     
      HashMap<String,Object> hsm = new HashMap<String,Object>();
      hsm.put("client", currentClient);
      hsm.put("message", newMessage);
     
      List<HashMap<String,Object>> myChatList = myChats.get(room_id);
      if (myChatList==null) myChatList = new LinkedList<HashMap<String,Object>>();
     
      if (myChatList.size()==chatRoomHistory) myChatList.remove(0);
      myChatList.add(hsm);
      myChats.put(room_id,myChatList);
     
      log.debug("SET CHATROOM: "+room_id);
     
      //broadcast to everybody in the room/domain
      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 {
                  log.debug("*..*idremote room_id: " + room_id);
                  log.debug("*..*my idstreamid room_id: " + rcl.getRoom_id());
                  if (room_id!=null && room_id.equals(rcl.getRoom_id())) {
                    ((IServiceCapableConnection) conn).invoke("sendVarsToMessageWithClient",new Object[] { hsm }, this);
                    log.debug("sending sendVarsToMessageWithClient to " + conn);
                    if (rcl.getIsRecording()){
                      StreamService.addChatEvent(rcl.getRoomRecordingName(),hsm);
                    }             
                  } else if (rcl.getIsChatNotification()) {
                    if (room_id.equals(rcl.getChatUserRoomId()) && room_id != null) {
                      ((IServiceCapableConnection) conn).invoke("sendVarsToMessageWithClient",new Object[] { hsm }, this);
                    }
                  }
                }
               
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.