use of org.mule.runtime.core.internal.processor.chain.ModuleOperationMessageProcessorChainBuilder in project mule by mulesoft.
the class ModuleOperationMessageProcessorChainFactoryBean method doGetObject.
@Override
public MessageProcessorChain doGetObject() throws Exception {
MessageProcessorChainBuilder builder = getBuilderInstance();
for (Object processor : processors) {
if (processor instanceof Processor) {
builder.chain((Processor) processor);
} else {
throw new IllegalArgumentException(format("MessageProcessorBuilder should only have MessageProcessor's or MessageProcessorBuilder's configured. Found a %s", processor.getClass().getName()));
}
}
final MessageProcessorChain messageProcessorChain = newLazyProcessorChainBuilder((ModuleOperationMessageProcessorChainBuilder) builder, muleContext, () -> getProcessingStrategy(locator, getRootContainerLocation()).orElse(null));
messageProcessorChain.setAnnotations(getAnnotations());
messageProcessorChain.setMuleContext(muleContext);
return messageProcessorChain;
}
Aggregations