public static interface Flow.Builder
Modifier and Type | Method and Description |
---|---|
Flow |
build()
Builds a flow with the provided configuration.
|
Flow.Builder |
initialState(String initialState)
Usually a flow is started automatically ("started"), but this attribute can be used to disable initial startup ("stopped").
|
Flow.Builder |
maxConcurrency(int maxConcurrency)
Configures the maximum permitted concurrency of the
Flow . |
Flow.Builder |
messagingExceptionHandler(FlowExceptionHandler exceptionListener)
Configures the exception listener to manage exceptions thrown on the flow execution.
|
Flow.Builder |
processingStrategyFactory(ProcessingStrategyFactory processingStrategyFactory)
Configures the factory used to create processing strategies on the created flow.
|
Flow.Builder |
processors(List<Processor> processors)
Configures the message processors to execute as part of flow.
|
Flow.Builder |
processors(Processor... processors)
Configures the message processors to execute as part of flow.
|
Flow.Builder |
source(MessageSource messageSource)
Configures the message source for the flow.
|
Flow.Builder |
withDirectProcessingStrategyFactory()
Configures a
DirectProcessingStrategyFactory as the processing
strategy on the flow. |
Flow.Builder source(MessageSource messageSource)
messageSource
- message source to use. Non null.Flow.Builder processors(List<Processor> processors)
processors
- message processors to execute. Non null.Flow.Builder processors(Processor... processors)
processors
- message processors to execute.Flow.Builder messagingExceptionHandler(FlowExceptionHandler exceptionListener)
exceptionListener
- exception listener to use on the flow. Non null.Flow.Builder processingStrategyFactory(ProcessingStrategyFactory processingStrategyFactory)
processingStrategyFactory
- factory to create processing strategies. Non null.Flow.Builder withDirectProcessingStrategyFactory()
DirectProcessingStrategyFactory
as the processing
strategy on the flow.Flow.Builder initialState(String initialState)
initialState
- The initial state of the flow. Non null.Flow.Builder maxConcurrency(int maxConcurrency)
Flow
. This value determines the maximum level of parallelism
that the Flow can use to optimize for performance when processing messages. Note that this does not impact in any way the
number of threads that a MessageSource
may use to invoke a Flow
and so if a direct or blocking
ProcessingStrategy
is used where processing occurs in source threads it is actually the source that defines maximum
concurrency.maxConcurrency
- Flow build()
Copyright © 2018. All rights reserved.