/** * Initialize child mediators recursively * * @param se synapse environment */ public void init(SynapseEnvironment se) { if (log.isDebugEnabled()) { log.debug("Initializing child mediators of mediator : " + getType()); } for (int i = 0; i < mediators.size(); i++) { Mediator mediator = mediators.get(i); mediator.setMediatorPosition(i); if (mediator instanceof ManagedLifecycle) { ((ManagedLifecycle) mediator).init(se); } if (mediator.isContentAware()) { if (log.isDebugEnabled()) { log.debug( mediator.getType() + " is content aware, setting sequence <" + getType() + "> as content aware"); } contentAware = true; } } }
public void init(SynapseEnvironment se) { if (resources.isEmpty()) { handleException( "The API: " + name + " has been configured without " + "any resource definitions"); } log.info("Initializing API: " + name); for (Resource resource : resources.values()) { resource.init(se); } for (Handler handler : handlers) { if (handler instanceof ManagedLifecycle) { ((ManagedLifecycle) handler).init(se); } } }
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); } } }