Package org.red5.server.api.scope

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


    HashMap<String, Client> roomClientList = new HashMap<String, Client>();
    try {

      log.debug("sendMessageByRoomAndDomain " + room_id);

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

      log.debug("webAppKeyScope " + webAppKeyScope);

      IScope scopeHibernate = webAppKeyScope.getScope(room_id.toString());

      if (scopeHibernate != null) {

        for (Set<IConnection> conset : webAppKeyScope.getScope(room_id.toString()).getConnections()) {
        for (IConnection conn : conset) {
View Full Code Here


  public synchronized void sendMessageWithClientByPublicSID(Object message,
      String publicSID) {
    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) {
        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);

      if (scopeHibernate != null) {
        // Notify the clients of the same scope (room) with user_id
View Full Code Here

  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>> 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) {
          concolset = 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 = 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 = 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");
View Full Code Here

    HashMap<String, Client> roomClientList = new HashMap<String, Client>();
    try {

      log.debug("sendMessageByRoomAndDomain " + room_id);

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

      log.debug("webAppKeyScope " + webAppKeyScope);

      IScope scopeHibernate = webAppKeyScope.getScope(room_id.toString());

      if (scopeHibernate != null) {

        Collection<Set<IConnection>> conCollection = webAppKeyScope
            .getScope(room_id.toString()).getConnections();
View Full Code Here

  public synchronized void sendMessageWithClientByPublicSID(Object message,
      String publicSID) {
    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) {
        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);

      if (scopeHibernate != null) {
        // Notify the clients of the same scope (room) with user_id
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.