Package org.openmeetings.app.conference.session

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


      log.debug("startNewObjectSyncprocess: " + object_id);

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

      // Do only send the Token to show the Loading Splash for the
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
View Full Code Here

      log.debug("checkScreenSharing -2- " + streamid);

      List<RoomClient> screenSharerList = new LinkedList<RoomClient>();

      RoomClient currentClient = this.clientListManager
          .getClientByStreamId(streamid);

      HashMap<String, RoomClient> roomList = this.clientListManager
          .getClientListByRoomAll(currentClient.getRoom_id());

      for (Iterator<String> iter = roomList.keySet().iterator(); iter
          .hasNext();) {

        RoomClient rcl = roomList.get(iter.next());

        if (rcl.isStartStreaming()) {
          screenSharerList.add(rcl);
        }

      }
View Full Code Here

      // IServiceCapableConnection service = (IServiceCapableConnection)
      // current;

      log.debug("### setConnectionAsSharingClient: ");

      RoomClient currentClient = this.clientListManager
          .getClientByStreamId(current.getClient().getId());

      if (currentClient != null) {

        boolean startRecording = Boolean.valueOf(map.get(
            "startRecording").toString());
        boolean startStreaming = Boolean.valueOf(map.get(
            "startStreaming").toString());

        currentClient.setRoom_id(Long.parseLong(current.getScope()
            .getName()));

        // Set this connection to be a RTMP-Java Client
        currentClient.setIsScreenClient(true);
        currentClient.setUser_id(Long.parseLong(map.get("user_id")
            .toString()));

        if (startStreaming) {
          currentClient.setStartStreaming(true);
        }

        if (startRecording) {
          currentClient.setStartRecording(true);
        }

        currentClient.setOrganization_id(Long.parseLong(map.get(
            "organization_id").toString()));

        this.clientListManager.updateClientByStreamId(current
            .getClient().getId(), currentClient);

        Map returnMap = new HashMap();
        returnMap.put("alreadyPublished", false);

        // if is already started screen sharing, then there is no need
        // to start it again
        if (currentClient.isScreenPublishStarted()) {
          returnMap.put("alreadyPublished", true);
        }

        currentClient.setVX(Integer.parseInt(map.get("screenX")
            .toString()));
        currentClient.setVY(Integer.parseInt(map.get("screenY")
            .toString()));
        currentClient.setVWidth(Integer.parseInt(map.get("screenWidth")
            .toString()));
        currentClient.setVHeight(Integer.parseInt(map.get(
            "screenHeight").toString()));

        log.debug("screen x,y,width,height " + currentClient.getVX()
            + " " + currentClient.getVY() + " "
            + currentClient.getVWidth() + " "
            + currentClient.getVHeight());

        log.debug("publishName :: " + map.get("publishName"));

        currentClient.setStreamPublishName(map.get("publishName")
            .toString());

        RoomClient currentScreenUser = this.clientListManager
            .getClientByPublicSID(currentClient
                .getStreamPublishName(), false);

        currentClient.setFirstname(currentScreenUser.getFirstname());
        currentClient.setLastname(currentScreenUser.getLastname());

        // This is duplicated, but its not sure that in the meantime
        // somebody requests this Client Object Info
        this.clientListManager.updateClientByStreamId(current
            .getClient().getId(), currentClient);
View Full Code Here

      Long user_level = userManagement.getUserLevelByID(users_id);

      if (authLevelManagement.checkUserLevel(user_level)) {

        IConnection current = Red5.getConnectionLocal();
        RoomClient currentClient = this.clientListManager
            .getClientByStreamId(current.getClient().getId());

        if (currentClient == null) {
          return;
        }

        String current_dir = ScopeApplicationAdapter.webAppPath
            + File.separatorChar + OpenmeetingsVariables.UPLOAD_DIR + File.separatorChar;
        log.debug("### this is my working directory: " + current_dir);

        FileExplorerItem fileExplorerItem = fileExplorerItemDao
            .getFileExplorerItemsById(fileExplorerItemId);

        ArrayList roomItems = libraryWmlLoader.loadWmlFile(current_dir,
            fileExplorerItem.getWmlFilePath());

        Map whiteboardObjClear = new HashMap();
        whiteboardObjClear.put(2, "clear");
        whiteboardObjClear.put(3, null);

        WhiteboardManagement.getInstance().addWhiteBoardObjectById(
            room_id, whiteboardObjClear, whiteboardId);

        for (int k = 0; k < roomItems.size(); k++) {

          ArrayList actionObject = (ArrayList) roomItems.get(k);

          Map whiteboardObj = new HashMap();
          whiteboardObj.put(2, "draw");
          whiteboardObj.put(3, actionObject);

          WhiteboardManagement.getInstance().addWhiteBoardObjectById(
              room_id, whiteboardObj, whiteboardId);

        }

        Map<String, Object> sendObject = new HashMap<String, Object>();
        sendObject.put("id", whiteboardId);
        sendObject.put("roomitems", roomItems);

        // Notify all Clients of that 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) {
                RoomClient rcl = this.clientListManager
                    .getClientByStreamId(conn.getClient()
                        .getId());
                if ((rcl == null)
                    || (rcl.getIsScreenClient() != null && rcl
                        .getIsScreenClient())) {
                  continue;
                } else {
                  // log.debug("*..*idremote: " +
                  // rcl.getStreamid());
View Full Code Here

      if (authLevelManagement.checkUserLevel(user_level)) {

        IConnection current = Red5.getConnectionLocal();
        String streamid = current.getClient().getId();

        RoomClient currentClient = this.clientListManager
            .getClientByStreamId(streamid);

        Long room_id = currentClient.getRoom_id();

        if (room_id != null) {

          String streamFolderName = ScopeApplicationAdapter.webAppPath
              + File.separatorChar
View Full Code Here

      Long userId, String username, String firstname, String lastname,
      String picture_uri) {
    try {
      IConnection current = Red5.getConnectionLocal();
      String streamid = current.getClient().getId();
      RoomClient currentClient = this.clientListManager
          .getClientByStreamId(streamid);

      currentClient.setUsername(username);
      currentClient.setUser_id(userId);
      currentClient.setPicture_uri(picture_uri);
      currentClient.setUserObject(userId, username, firstname, lastname);

      // Update Session Data
      sessionManagement.updateUserWithoutSession(SID, userId);

      Users user = userManagement.getUserById(userId);

      if (user != null) {
        currentClient.setExternalUserId(user.getExternalUserId());
        currentClient.setExternalUserType(user.getExternalUserType());
      }

      // only fill this value from User-Record
      // cause invited users have non
      // you cannot set the firstname,lastname from the UserRecord
      Users us = usersDao.getUser(userId);
      if (us != null && us.getPictureuri() != null) {
        // set Picture-URI
        currentClient.setPicture_uri(us.getPictureuri());
      }
      this.clientListManager.updateClientByStreamId(streamid,
          currentClient);
      return currentClient;
    } catch (Exception err) {
View Full Code Here

  public synchronized RoomClient setUsernameAndSession(String SID,
      Long userId, String username, String firstname, String lastname) {
    try {
      IConnection current = Red5.getConnectionLocal();
      String streamid = current.getClient().getId();
      RoomClient currentClient = this.clientListManager
          .getClientByStreamId(streamid);

      currentClient.setUsername(username);
      currentClient.setUser_id(userId);
      currentClient.setUserObject(userId, username, firstname, lastname);

      // Update Session Data
      log.debug("UDPATE SESSION " + SID + ", " + userId);
      sessionManagement.updateUserWithoutSession(SID, userId);

      Users user = userManagement.getUserById(userId);

      if (user != null) {
        currentClient.setExternalUserId(user.getExternalUserId());
        currentClient.setExternalUserType(user.getExternalUserType());
      }

      // only fill this value from User-Record
      // cause invited users have non
      // you cannot set the firstname,lastname from the UserRecord
      Users us = usersDao.getUser(userId);
      if (us != null && us.getPictureuri() != null) {
        // set Picture-URI
        currentClient.setPicture_uri(us.getPictureuri());
      }
      this.clientListManager.updateClientByStreamId(streamid,
          currentClient);
      return currentClient;
    } catch (Exception err) {
View Full Code Here

        Collection<Set<IConnection>> conCollection = webAppKeyScope
            .getScope(room_id.toString()).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 (conn instanceof IServiceCapableConnection) {
                  // RoomClient rcl =
                  // this.clientListManager.getClientByStreamId(conn.getClient().getId());
View Full Code Here

  public synchronized List<RoomClient> getCurrentModeratorList() {
    try {
      log.debug("*..*getCurrentModerator id: ");

      IConnection current = Red5.getConnectionLocal();
      RoomClient currentClient = this.clientListManager
          .getClientByStreamId(current.getClient().getId());
      Long room_id = currentClient.getRoom_id();

      // log.debug("Who is this moderator? "+currentMod);

      return this.clientListManager.getCurrentModeratorByRoom(room_id);
    } catch (Exception err) {
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.