code: public void stop() {
          log.debug("stop: {}", name);
          if (enabled && running && handler != null) {
              try {
                  // if we dont have a handler of our own dont try to stop it
                  handler.stop(this);
              } catch (Throwable e) {
                  log.error("Could not stop scope {}", this, e);
              } finally {
                  // post notification
                  ((Server) getServer()).notifyScopeRemoved(this);
              }
              // remove all children
              removeChildren();
          }
          running = false;
      }
docs: Stops scope