Search in sources :

Example 1 with ModuleOperationMessageProcessorChainBuilder

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;
}
Also used : MessageProcessorChain(org.mule.runtime.core.privileged.processor.chain.MessageProcessorChain) Processor(org.mule.runtime.core.api.processor.Processor) MessageProcessorChainBuilder(org.mule.runtime.core.privileged.processor.chain.MessageProcessorChainBuilder) ModuleOperationMessageProcessorChainBuilder(org.mule.runtime.core.internal.processor.chain.ModuleOperationMessageProcessorChainBuilder)

Aggregations

Processor (org.mule.runtime.core.api.processor.Processor)1 ModuleOperationMessageProcessorChainBuilder (org.mule.runtime.core.internal.processor.chain.ModuleOperationMessageProcessorChainBuilder)1 MessageProcessorChain (org.mule.runtime.core.privileged.processor.chain.MessageProcessorChain)1 MessageProcessorChainBuilder (org.mule.runtime.core.privileged.processor.chain.MessageProcessorChainBuilder)1