org.springframework.batch.integration.chunk

## Class RemoteChunkingWorkerBuilder<I,O>

- java.lang.Object
- - org.springframework.batch.integration.chunk.RemoteChunkingWorkerBuilder<I,O>

- Type Parameters:
    `I` - type of input items
    `O` - type of output items

      public class RemoteChunkingWorkerBuilder<I,O>
      extends java.lang.Object

  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, a `PassThroughItemProcessor` will be used
  - creates an `IntegrationFlow` with the `ChunkProcessorChunkHandler` as a service activator which listens to incoming requests on `inputChannel` and sends replies on `outputChannel`
  Since:
    4.1
  Author:
    Mahmoud Ben Hassine

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RemoteChunkingWorkerBuilder()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.springframework.integration.dsl.IntegrationFlow` | `build()` Create an `IntegrationFlow` with a `ChunkProcessorChunkHandler` configured as a service activator listening to the input channel and replying on the output channel.
    `RemoteChunkingWorkerBuilder<I,O>` | `inputChannel(org.springframework.messaging.MessageChannel inputChannel)` Set the input channel on which items sent by the master are received.
    `RemoteChunkingWorkerBuilder<I,O>` | `itemProcessor(ItemProcessor<I,O> itemProcessor)` Set the `ItemProcessor` to use to process items sent by the master step.
    `RemoteChunkingWorkerBuilder<I,O>` | `itemWriter(ItemWriter<O> itemWriter)` Set the `ItemWriter` to use to write items sent by the master step.
    `RemoteChunkingWorkerBuilder<I,O>` | `outputChannel(org.springframework.messaging.MessageChannel outputChannel)` Set the output channel on which replies will be sent to the master step.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RemoteChunkingWorkerBuilder

          public RemoteChunkingWorkerBuilder()

  - ### Method Detail

    - #### itemProcessor

          public RemoteChunkingWorkerBuilder<I,O> itemProcessor(ItemProcessor<I,O> itemProcessor)

      Set the `ItemProcessor` to use to process items sent by the master step.
      Parameters:
        `itemProcessor` - to use
      Returns:
        this builder instance for fluent chaining

    - #### itemWriter

          public RemoteChunkingWorkerBuilder<I,O> itemWriter(ItemWriter<O> itemWriter)

      Set the `ItemWriter` to use to write items sent by the master 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 master 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 master step.
      Parameters:
        `outputChannel` - the output channel
      Returns:
        this builder instance for fluent chaining

    - #### build

          public org.springframework.integration.dsl.IntegrationFlow build()

      Create an `IntegrationFlow` with a `ChunkProcessorChunkHandler` configured as a service activator listening to the input channel and replying on the output channel.
      Returns:
        the integration flow