Package org.red5.server.api

Examples of org.red5.server.api.IScope


          }
          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, rcl.getStreamid(), currentScope);
View Full Code Here


    HashMap <String,RoomClient> roomClientList = new HashMap<String,RoomClient>();
    try {
     
      log.debug("sendMessageByRoomAndDomain "+room_id);
     
      IScope globalScope = getContext().getGlobalScope();
     
      IScope webAppKeyScope = globalScope.getScope(ScopeApplicationAdapter.webAppRootKey);
     
      log.debug("webAppKeyScope "+webAppKeyScope);
     
      IScope scopeHibernate = webAppKeyScope.getScope(room_id.toString());
      //IScope scopeHibernate = webAppKeyScope.getScope("hibernate");
     
     
      if (scopeHibernate!=null){
       
View Full Code Here

  }
 
  public synchronized IScope getRoomScope(String room) {
    try {
     
      IScope globalScope = getContext().getGlobalScope();
      IScope webAppKeyScope = globalScope.getScope(ScopeApplicationAdapter.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

      screenSharingCursor.setX(cursorStatus.getX());
      screenSharingCursor.setY(cursorStatus.getY());
       
      String publicSID = cursorStatus.getPublicSID();
     
      IScope globalScope = getContext().getGlobalScope();
      IScope webAppKeyScope = globalScope.getScope(ScopeApplicationAdapter.webAppRootKey);
     
      //log.debug("webAppKeyScope "+webAppKeyScope);
     
      //Get Room Id to send it to the correct Scope
      RoomClient currentClient = this.clientListManager.getClientByPublicSID(publicSID);
     
      if (currentClient == null) {
        return;
        //throw new Exception("Could not Find RoomClient on List "+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

      screenSharingNewFrame.setH(serverFrameBean.getHeight());
      screenSharingNewFrame.setW(serverFrameBean.getWidth());
       
      String publicSID = serverFrameBean.getPublicSID();
     
      IScope globalScope = getContext().getGlobalScope();
      IScope webAppKeyScope = globalScope.getScope(ScopeApplicationAdapter.webAppRootKey);
     
      //log.debug("webAppKeyScope "+webAppKeyScope);
     
      //Get Room Id to send it to the correct Scope
      RoomClient currentClient = this.clientListManager.getClientByPublicSID(publicSID);
     
      if (currentClient == null) {
        return;
        //throw new Exception("Could not Find RoomClient on List "+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

      }
     
     
      String publicSID = serverSharingSessionBean.getPublicSID();
     
      IScope globalScope = getContext().getGlobalScope();
      IScope webAppKeyScope = globalScope.getScope(ScopeApplicationAdapter.webAppRootKey);
     
      //log.debug("webAppKeyScope "+webAppKeyScope);
     
      //Get Room Id to send it to the correct Scope
      RoomClient currentClient = this.clientListManager.getClientByPublicSID(publicSID);
     
      if (currentClient == null) {
        return;
        //throw new Exception("Could not Find RoomClient on List");
      }
      //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 sendMessageWithClientByPublicSID(Object message, String publicSID) {
    try {
      //ApplicationContext appCtx = getContext().getApplicationContext();
      IScope globalScope = getContext().getGlobalScope();
     
      IScope webAppKeyScope = globalScope.getScope(ScopeApplicationAdapter.webAppRootKey);
     
      //log.debug("webAppKeyScope "+webAppKeyScope);
     
      //Get Room Id to send it to the correct Scope
      RoomClient currentClient = this.clientListManager.getClientByPublicSID(publicSID);
     
      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(ScopeApplicationAdapter.webAppRootKey);
     
      //log.debug("webAppKeyScope "+webAppKeyScope);
     
      //Get Room Id to send it to the correct Scope
      RoomClient currentClient = this.clientListManager.getClientByPublicSID(publicSID);
     
      if (currentClient == null) {
        currentClient = this.clientListManager.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

  /*
   * change the status of the webcam: can be "on" or "off"
   */
  public void change_webcam(String webcam) {
    //
        IScope appScope = Red5.getConnectionLocal().getScope();
        IConnection conn = Red5.getConnectionLocal();
      String uid = conn.getClient().getId();
      log.debug("change_webcam called form id:"+uid+" :"+webcam);
        ServiceUtils.invokeOnAllConnections (appScope, "change_webcam", new Object[]{uid,webcam} );
  }
View Full Code Here

   * change the status of the user to "status"
   */
  //
  public void changeProfil(String webcam,String role, String onlineStatus) {
    //
        IScope appScope = Red5.getConnectionLocal().getScope();
        IConnection conn = Red5.getConnectionLocal();
      String _id = conn.getClient().getId();
      log.debug("changeProfil called form id:"+_id+" :"+webcam);
        ServiceUtils.invokeOnAllConnections (appScope, "changeProfil", new Object[]{_id,webcam,role,onlineStatus} );
       // return (new Object[]{uid,status});
View Full Code Here

TOP

Related Classes of org.red5.server.api.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.