Package org.apache.openmeetings.persistence.beans.room

Examples of org.apache.openmeetings.persistence.beans.room.Client


 
  public synchronized void sendUploadCompletMessageByPublicSID(UploadCompleteMessage message, String publicSID) {
    try {
      //if the upload is locally, just proceed to the normal function
      //Search for RoomClient on current server (serverId == null means it will look on the master for the RoomClient)
      Client currentClient = this.sessionManager
                .getClientByPublicSID(publicSID, false, null);
     
      if (currentClient != null) {
        sendMessageWithClientByPublicSID(message, publicSID);
      } else {
View Full Code Here


          .getScope(OpenmeetingsVariables.webAppRootKey);

      // log.debug("webAppKeyScope "+webAppKeyScope);

      // Get Room Id to send it to the correct Scope
      Client currentClient = this.sessionManager
          .getClientByPublicSID(publicSID, false, null);

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

  public WhiteboardObjectList getRoomItemsBy() {
    try {
      IConnection current = Red5.getConnectionLocal();
      String streamid = current.getClient().getId();
      Client currentClient = this.sessionManager
          .getClientByStreamId(streamid, null);
      Long room_id = currentClient.getRoom_id();

      log.debug("getRoomItems: " + room_id);
      WhiteboardObjectList whiteboardObjectList = this.whiteBoardObjectListManagerById
          .getWhiteBoardObjectListByRoomId(room_id);
View Full Code Here

          .getScope(OpenmeetingsVariables.webAppRootKey);

      // log.debug("webAppKeyScope "+webAppKeyScope);

      // Get Room Id to send it to the correct Scope
      Client currentClient = this.sessionManager
          .getClientByPublicSID(publicSID, false, null);

      if (currentClient == null) {
        currentClient = sessionManager.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) {
View Full Code Here

  public Boolean setCanDraw(String SID, String publicSID, boolean canDraw) {
    try {

      IConnection current = Red5.getConnectionLocal();
      String streamid = current.getClient().getId();
      Client currentClient = this.sessionManager
          .getClientByStreamId(streamid, null);

      Long users_id = sessiondataDao.checkSession(SID);
      Long user_level = userManager.getUserLevelByID(users_id);

      if (authLevelUtil.checkUserLevel(user_level)) {

        if (currentClient.getIsMod()) {
          Client rcl = this.sessionManager
              .getClientByPublicSID(publicSID, false, null);

          if (rcl != null) {
            rcl.setCanDraw(canDraw);
            this.sessionManager.updateClientByStreamId(
                rcl.getStreamid(), rcl, false, null);

            HashMap<Integer, Object> newMessage = new HashMap<Integer, Object>();
            newMessage.put(0, "updateDrawStatus");
            newMessage.put(1, rcl);
            this.scopeApplicationAdapter
View Full Code Here

          .getConnections();
      for (Set<IConnection> conset : conCollection) {
        for (IConnection conn : conset) {
          if (conn != null) {

            Client rcl = this.sessionManager
                .getClientByStreamId(conn.getClient().getId(),
                    null);

            if (rcl.getIsRecording() != null
                && rcl.getIsRecording()) {
              return true;
            }

          }
        }
View Full Code Here

  public Boolean setCanShare(String SID, String publicSID, boolean canShare) {
    try {

      IConnection current = Red5.getConnectionLocal();
      String streamid = current.getClient().getId();
      Client currentClient = this.sessionManager
          .getClientByStreamId(streamid, null);

      Long users_id = sessiondataDao.checkSession(SID);
      Long user_level = userManager.getUserLevelByID(users_id);

      if (authLevelUtil.checkUserLevel(user_level)) {

        if (currentClient.getIsMod()) {
          Client rcl = this.sessionManager
              .getClientByPublicSID(publicSID, false, null);

          if (rcl != null) {
            rcl.setCanShare(canShare);
            this.sessionManager.updateClientByStreamId(
                rcl.getStreamid(), rcl, false, null);

            HashMap<Integer, Object> newMessage = new HashMap<Integer, Object>();
            newMessage.put(0, "updateDrawStatus");
            newMessage.put(1, rcl);
            this.scopeApplicationAdapter
View Full Code Here

          .getConnections();
      for (Set<IConnection> conset : conCollection) {
        for (IConnection conn : conset) {
          if (conn != null) {

            Client rcl = this.sessionManager
                .getClientByStreamId(conn.getClient().getId(), null);

            if (rcl.getIsRecording() != null
                && rcl.getIsRecording()) {
              return false;
            }

          }
        }
      }

      Client current_rcl = this.sessionManager
          .getClientByStreamId(current.getClient().getId(), null);

      // Also set the Recording Flag to Record all Participants that enter
      // later
      current_rcl.setIsRecording(true);
      this.sessionManager.updateClientByStreamId(current.getClient()
          .getId(), current_rcl, false, null);

      Map<String, String> interviewStatus = new HashMap<String, String>();
      interviewStatus.put("action", "start");
View Full Code Here

  public Boolean setCanRemote(String SID, String publicSID, boolean canRemote) {
    try {

      IConnection current = Red5.getConnectionLocal();
      String streamid = current.getClient().getId();
      Client currentClient = this.sessionManager
          .getClientByStreamId(streamid, null);

      Long users_id = sessiondataDao.checkSession(SID);
      Long user_level = userManager.getUserLevelByID(users_id);

      if (authLevelUtil.checkUserLevel(user_level)) {

        if (currentClient.getIsMod()) {
          Client rcl = this.sessionManager
              .getClientByPublicSID(publicSID, false, null);

          if (rcl != null) {
            rcl.setCanRemote(canRemote);
            this.sessionManager.updateClientByStreamId(
                rcl.getStreamid(), rcl, false, null);

            HashMap<Integer, Object> newMessage = new HashMap<Integer, Object>();
            newMessage.put(0, "updateDrawStatus");
            newMessage.put(1, rcl);
            this.scopeApplicationAdapter
View Full Code Here

          .getConnections();
      for (Set<IConnection> conset : conCollection) {
        for (IConnection conn : conset) {
          if (conn != null) {

            Client rcl = this.sessionManager
                .getClientByStreamId(conn.getClient().getId(), null);

            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.sessionManager.updateClientByStreamId(conn
                  .getClient().getId(), rcl, false, null);

              found = true;
            }

          }
        }
      }

      if (!found) {
        return false;
      }

      Client currentClient = this.sessionManager
          .getClientByStreamId(current.getClient().getId(), null);

      this.flvRecorderService.stopRecordAndSave(scope, currentClient,
          flvRecordingId);
View Full Code Here

TOP

Related Classes of org.apache.openmeetings.persistence.beans.room.Client

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.