Package org.openmeetings.app.conference.session

Examples of org.openmeetings.app.conference.session.RoomClient


          .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


          .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());

      // 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");

      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.getIsAVClient()) {
              continue;
            } else if (rcl.getIsScreenClient() != null && rcl.getIsScreenClient()) {
              continue;
            }

            ((IServiceCapableConnection) conn).invoke(
                "interviewStatus",
View Full Code Here

          .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)) {
                ((IServiceCapableConnection) conn).invoke(
                    "sendRemoteCursorEvent",
                    new Object[] { messageObj }, this);
                log.debug("sendRemoteCursorEvent messageObj"
                    + messageObj);
View Full Code Here

          .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);
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());

      return this.clientListManager.getClientListByRoom(currentClient.getRoom_id());

    } catch (Exception err) {
      log.debug("[getClientListScope]", err);
    }
    return roomClientList;
View Full Code Here

   */

    public synchronized void updateSipTransport() {
        IConnection current = Red5.getConnectionLocal();
        String streamid = current.getClient().getId();
        RoomClient currentClient = this.clientListManager.getClientByStreamId(streamid);
        log.debug("getSipConferenceMembersNumber: " + roommanagement.getSipConferenceMembersNumber(currentClient.getRoom_id()));
        String newNumber = "("+Integer.toString(roommanagement.getSipConferenceMembersNumber(currentClient.getRoom_id())-1)+")";
        if(!newNumber.equals(currentClient.getLastname())) {
            currentClient.setLastname(newNumber);
            this.clientListManager.updateClientByStreamId(streamid, currentClient);
            log.debug("updateSipTransport: {}, {}, {}, {}", new Object[]{currentClient.getPublicSID(),
                    currentClient.getRoom_id(), currentClient.getFirstname(), currentClient.getLastname()});
            sendMessageWithClient(new String[]{"personal",currentClient.getFirstname(),currentClient.getLastname()});
        }
    }
View Full Code Here

     * @param number to call
     */
    public synchronized void joinToConfCall(String number) {
        IConnection current = Red5.getConnectionLocal();
        String streamid = current.getClient().getId();
        RoomClient currentClient = this.clientListManager.getClientByStreamId(streamid);
        Rooms rooms = roommanagement.getRoomById(currentClient.getRoom_id());
        log.debug("asterisk -rx \"originate Local/" + number + "@rooms extension " + rooms.getSipNumber() + "@rooms\"");
        try {
            Runtime.getRuntime().exec(new String[]{"asterisk", "-rx", "originate Local/" + number + "@rooms extension " + rooms.getSipNumber() + "@rooms"});
        } catch (IOException e) {
            log.error("Executing asterisk originate error: ", e);
View Full Code Here

    public synchronized void setSipTransport(Long room_id, String publicSID, String broadCastId) {
        IConnection current = Red5.getConnectionLocal();
        String streamid = current.getClient().getId();
        // Notify all clients of the same scope (room)
        RoomClient currentClient = this.clientListManager.getClientByStreamId(streamid);
        currentClient.setRoom_id(room_id);
        currentClient.setRoomEnter(new Date());
        currentClient.setFirstname("SIP Transport");
        currentClient.setLastname("("+Integer.toString(roommanagement.getSipConferenceMembersNumber(room_id)-1)+")");
        currentClient.setBroadCastID(Long.parseLong(broadCastId));
        currentClient.setIsBroadcasting(true);
        currentClient.setPublicSID(publicSID);
        currentClient.setAvsettings("av");
        currentClient.setVWidth(120);
        currentClient.setVHeight(90);
        this.clientListManager.updateClientByStreamId(streamid, currentClient);

        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
View Full Code Here

    try {
      Long users_id = sessionManagement.checkSession(SID);
      Long user_level = userManagement.getUserLevelByID(users_id);
      // admins only
      if (authLevelManagement.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);

        HashMap<Integer, String> messageObj = new HashMap<Integer, String>();
View Full Code Here

      Long users_id = sessionManagement.checkSession(SID);
      Long user_level = userManagement.getUserLevelByID(users_id);
      // users only
      if (authLevelManagement.checkUserLevel(user_level)) {

        RoomClient rcl = this.clientListManager
            .getClientByPublicSID(publicSID, false);

        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, true);

        return true;
View Full Code Here

TOP

Related Classes of org.openmeetings.app.conference.session.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.