/** Destroy child mediators recursively */
  public void destroy() {
    if (log.isDebugEnabled()) {
      log.debug("Destroying child mediators of mediator : " + getType());
    }

    for (Mediator mediator : mediators) {
      if (mediator instanceof ManagedLifecycle) {
        ((ManagedLifecycle) mediator).destroy();
      }
    }
  }
Exemplo n.º 2
0
  public void destroy() {
    log.info("Destroying API: " + name);
    for (Resource resource : resources.values()) {
      resource.destroy();
    }

    for (Handler handler : handlers) {
      if (handler instanceof ManagedLifecycle) {
        ((ManagedLifecycle) handler).destroy();
      }
    }
  }
Exemplo n.º 3
0
  public void destroy() {

    for (Target target : targets) {
      ManagedLifecycle seq = target.getSequence();
      if (seq != null) {
        seq.destroy();
      } else if (target.getSequenceRef() != null) {
        SequenceMediator targetSequence =
            (SequenceMediator)
                synapseEnv.getSynapseConfiguration().getSequence(target.getSequenceRef());

        if (targetSequence == null || targetSequence.isDynamic()) {
          synapseEnv.removeUnavailableArtifactRef(target.getSequenceRef());
        }
      }
      Endpoint endpoint = target.getEndpoint();
      if (endpoint != null) {
        endpoint.destroy();
      }
    }
  }