code: public void addScope(IScope scope) {
          String app = scope.getName();
          // add the name to the collection (no '/' prefix)
          activeRooms.add(app);
          // check the context for a predefined websocket scope
          IContext ctx = scope.getContext();
          if (ctx != null && ctx.hasBean("webSocketScopeDefault")) {
              log.debug("WebSocket scope found in context");
              WebSocketScope wsScope = (WebSocketScope) scope.getContext().getBean("webSocketScopeDefault");
              if (wsScope != null) {
                  log.trace("Default WebSocketScope has {} listeners", wsScope.getListeners().size());
              }
              // add to scopes
              scopes.put(String.format("/%s", app), wsScope);
          } else {
              log.debug("Creating a new scope");
              // add a default scope and listener if none are defined
              WebSocketScope wsScope = new WebSocketScope();
              wsScope.setScope(scope);
              wsScope.setPath(String.format("/%s", app));
              if (wsScope.getListeners().isEmpty()) {
                  log.debug("adding default listener");
                  wsScope.addListener(new DefaultWebSocketDataListener());
              }
              notifyListeners(WebSocketEvent.SCOPE_CREATED, wsScope);
              // add to scopes
              addWebSocketScope(wsScope);
          }
      }
docs: Adds a scope to the enabled applications.
  
  @param scope
  the application scope