Class RemoteChunkingWorkerBuilder<I,O>
java.lang.Object
org.springframework.batch.integration.chunk.RemoteChunkingWorkerBuilder<I,O>
- Type Parameters:
I
- type of input itemsO
- type of output items
Builder for a worker in a remote chunking setup. This builder:
- creates a
ChunkProcessorChunkHandler
with the provided item processor and writer. If no item processor is provided, aPassThroughItemProcessor
will be used - creates an
IntegrationFlow
with theChunkProcessorChunkHandler
as a service activator which listens to incoming requests oninputChannel
and sends replies onoutputChannel
- Since:
- 4.1
- Author:
- Mahmoud Ben Hassine
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.integration.dsl.IntegrationFlow
build()
Create anIntegrationFlow
with aChunkProcessorChunkHandler
configured as a service activator listening to the input channel and replying on the output channel.inputChannel
(org.springframework.messaging.MessageChannel inputChannel) Set the input channel on which items sent by the manager are received.itemProcessor
(ItemProcessor<I, O> itemProcessor) Set theItemProcessor
to use to process items sent by the manager step.itemWriter
(ItemWriter<O> itemWriter) Set theItemWriter
to use to write items sent by the manager step.outputChannel
(org.springframework.messaging.MessageChannel outputChannel) Set the output channel on which replies will be sent to the manager step.
-
Constructor Details
-
RemoteChunkingWorkerBuilder
public RemoteChunkingWorkerBuilder()
-
-
Method Details
-
itemProcessor
Set theItemProcessor
to use to process items sent by the manager step.- Parameters:
itemProcessor
- to use- Returns:
- this builder instance for fluent chaining
-
itemWriter
Set theItemWriter
to use to write items sent by the manager step.- Parameters:
itemWriter
- to use- Returns:
- this builder instance for fluent chaining
-
inputChannel
public RemoteChunkingWorkerBuilder<I,O> inputChannel(org.springframework.messaging.MessageChannel inputChannel) Set the input channel on which items sent by the manager are received.- Parameters:
inputChannel
- the input channel- Returns:
- this builder instance for fluent chaining
-
outputChannel
public RemoteChunkingWorkerBuilder<I,O> outputChannel(org.springframework.messaging.MessageChannel outputChannel) Set the output channel on which replies will be sent to the manager step.- Parameters:
outputChannel
- the output channel- Returns:
- this builder instance for fluent chaining
-
build
public org.springframework.integration.dsl.IntegrationFlow build()Create anIntegrationFlow
with aChunkProcessorChunkHandler
configured as a service activator listening to the input channel and replying on the output channel.- Returns:
- the integration flow
-