Package org.apache.openmeetings.db.entity.room

Examples of org.apache.openmeetings.db.entity.room.Client


        i++;
      }

      // Check if this User is the Mod:
      IConnection current = Red5.getConnectionLocal();
      Client currentClient = this.sessionManager
          .getClientByStreamId(current.getClient().getId(), null);

      if (currentClient == null) {
        return;
      }

      Long room_id = currentClient.getRoom_id();

      // log.debug("***** sendVars: " + whiteboardObj);

      // Store event in list
      String action = whiteboardObj.get(2).toString();
View Full Code Here


  public synchronized int sendVarsModeratorGeneral(Object vars) {
    log.debug("*..*sendVars: " + vars);
    try {
      IConnection current = Red5.getConnectionLocal();
      Client currentClient = this.sessionManager
          .getClientByStreamId(current.getClient().getId(), null);
      // Long room_id = currentClient.getRoom_id();

      log.debug("***** id: " + currentClient.getStreamid());

      boolean ismod = currentClient.getIsMod();

      if (ismod) {
        log.debug("CurrentScope :" + current.getScope().getName());
        // Send to all Clients of the same Scope
        for (Set<IConnection> conset : current.getScope().getConnections()) {
View Full Code Here

   * @return 1 in case of success, -1 otherwise
   */
  public synchronized int sendMessageWithClientWithSyncObject(Object newMessage, boolean sync) {
    try {
      IConnection current = Red5.getConnectionLocal();
      Client currentClient = this.sessionManager
          .getClientByStreamId(current.getClient().getId(), null);

      HashMap<String, Object> hsm = new HashMap<String, Object>();
      hsm.put("client", currentClient);
      hsm.put("message", newMessage);
View Full Code Here

   */
  public synchronized int sendMessageWithClientById(Object newMessage,
      String clientId) {
    try {
      IConnection current = Red5.getConnectionLocal();
      Client currentClient = this.sessionManager
          .getClientByStreamId(current.getClient().getId(), null);

      HashMap<String, Object> hsm = new HashMap<String, Object>();
      hsm.put("client", currentClient);
      hsm.put("message", newMessage);
View Full Code Here

 
  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

          .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>> concolset = 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)
        concolset = 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

      IConnection current = Red5.getConnectionLocal();

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

      Collection<Set<IConnection>> concolset = current.getScope().getConnections();
      for (Set<IConnection> conset : concolset) {
        for (IConnection conn : conset) {
          if (conn != null) {
            Client rcl = sessionManager.getClientByStreamId(conn.getClient().getId(), null);
 
            if (rcl != null && rcl.getIsRecording() != null && rcl.getIsRecording()) {
              return false;
            }
          }
        }
      }
      Client current_rcl = sessionManager.getClientByStreamId(current.getClient().getId(), null);

      // Also set the Recording Flag to Record all Participants that enter
      // later
      current_rcl.setIsRecording(true);
      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

  }

  private Long checkRecordingClient(IConnection conn) {
    Long flvRecordingId = null;
    if (conn != null) {
      Client rcl = sessionManager.getClientByStreamId(conn.getClient().getId(), null);
      if (rcl != null && 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
        sessionManager.updateClientByStreamId(conn.getClient().getId(), rcl, false, null);
      }
View Full Code Here

TOP

Related Classes of org.apache.openmeetings.db.entity.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.