code: public void undeploy(@Observes final BeforeStop event) {
          if (extensionEnabled()) {
              debug("Catching BeforeStop event {0}", event.toString());
              undeployDeployments = true;
              undeployEvent.fire(new UnDeployManagedDeployments());
          }
      }
docs: Undeploy event.
  
  @param event event to observe