Search in sources :

Example 1 with Flow.builder

use of org.mule.runtime.core.api.construct.Flow.builder in project mule by mulesoft.

the class DefaultFlowFactoryBean method getObject.

@Override
public Flow getObject() throws Exception {
    Builder flowBuilder = Flow.builder(name, muleContext).messagingExceptionHandler(exceptionListener).initialState(initialState);
    flowBuilder.processors(messageProcessors != null ? messageProcessors : emptyList());
    if (messageSource != null) {
        flowBuilder.source(messageSource);
    }
    if (processingStrategyFactory != null) {
        flowBuilder.processingStrategyFactory(processingStrategyFactory);
    }
    if (maxConcurrency != null) {
        flowBuilder.maxConcurrency(maxConcurrency.intValue());
    }
    final DefaultFlow build = (DefaultFlow) flowBuilder.build();
    build.setAnnotations(getAnnotations());
    return build;
}
Also used : Builder(org.mule.runtime.core.api.construct.Flow.Builder) DefaultFlow(org.mule.runtime.core.internal.construct.DefaultFlowBuilder.DefaultFlow)

Aggregations

Builder (org.mule.runtime.core.api.construct.Flow.Builder)1 DefaultFlow (org.mule.runtime.core.internal.construct.DefaultFlowBuilder.DefaultFlow)1