Package org.red5.server.api.scope

Examples of org.red5.server.api.scope.IScope


  public synchronized void sendMessageWithClientByPublicSIDOrUser(
      Object message, String publicSID, Long user_id) {
    try {
      // ApplicationContext appCtx = getContext().getApplicationContext();

      IScope globalScope = getContext().getGlobalScope();

      IScope webAppKeyScope = globalScope
          .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) {
          conCollection = webAppKeyScope.getScope(scopeName)
              .getConnections();
        }
View Full Code Here


    }

  public synchronized IScope getRoomScope(String room) {
    try {

      IScope globalScope = getContext().getGlobalScope();
      IScope webAppKeyScope = globalScope
          .getScope(OpenmeetingsVariables.webAppRootKey);

      String scopeName = "hibernate";
      // If set then its a NON default Scope
      if (room.length() != 0) {
        scopeName = room;
      }

      IScope scopeHibernate = webAppKeyScope.getScope(scopeName);

      return scopeHibernate;
    } catch (Exception err) {
      log.error("[getRoomScope]", err);
    }
View Full Code Here

          }
          String scopeName = "hibernate";
          if (rcl.getRoom_id() != null) {
            scopeName = rcl.getRoom_id().toString();
          }
          IScope currentScope = scopeApplicationAdapter
              .getRoomScope(scopeName);
          scopeApplicationAdapter.roomLeaveByScope(rcl, currentScope, true);

          HashMap<Integer, String> messageObj = new HashMap<Integer, String>();
          messageObj.put(0, "kick");
View Full Code Here

        String scopeName = "hibernate";
        if (rcl.getRoom_id() != null) {
          scopeName = rcl.getRoom_id().toString();
        }
        IScope currentScope = scopeApplicationAdapter
            .getRoomScope(scopeName);

        HashMap<Integer, String> messageObj = new HashMap<Integer, String>();
        messageObj.put(0, "kick");
        scopeApplicationAdapter.sendMessageById(messageObj,
View Full Code Here

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

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

          }
          String scopeName = "hibernate";
          if (rcl.getRoom_id() != null) {
            scopeName = rcl.getRoom_id().toString();
          }
          IScope currentScope = scopeApplicationAdapter
              .getRoomScope(scopeName);
          scopeApplicationAdapter.roomLeaveByScope(rcl, currentScope, true);

          HashMap<Integer, String> messageObj = new HashMap<Integer, String>();
          messageObj.put(0, "kick");
View Full Code Here

        String scopeName = "hibernate";
        if (rcl.getRoom_id() != null) {
          scopeName = rcl.getRoom_id().toString();
        }
        IScope currentScope = scopeApplicationAdapter
            .getRoomScope(scopeName);

        HashMap<Integer, String> messageObj = new HashMap<Integer, String>();
        messageObj.put(0, "kick");
        scopeApplicationAdapter.sendMessageById(messageObj,
View Full Code Here

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

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

TOP

Related Classes of org.red5.server.api.scope.IScope

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.