コード例 #1
0
ファイル: CloneMediator.java プロジェクト: ruks/wso2-synapse
  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();
      }
    }
  }
コード例 #2
0
ファイル: CloneMediator.java プロジェクト: ruks/wso2-synapse
  public void init(SynapseEnvironment se) {

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

        if (targetSequence == null || targetSequence.isDynamic()) {
          se.addUnavailableArtifactRef(target.getSequenceRef());
        }
      }
      Endpoint endpoint = target.getEndpoint();
      if (endpoint != null) {
        endpoint.init(se);
      }
    }
  }