org.springframework.batch.item.support

## Class CompositeItemStream

- java.lang.Object
- - org.springframework.batch.item.support.CompositeItemStream

- All Implemented Interfaces:
    ItemStream

      public class CompositeItemStream
      extends java.lang.Object
      implements ItemStream

  Simple `ItemStream` that delegates to a list of other streams.
  Author:
    Dave Syer

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompositeItemStream()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Broadcast the call to close.
    `void` | `open(ExecutionContext executionContext)` Broadcast the call to open.
    `void` | `register(ItemStream stream)` Register a `ItemStream` as one of the interesting providers under the provided key.
    `void` | `setStreams(ItemStream[] listeners)` Public setter for the listeners.
    `void` | `update(ExecutionContext executionContext)` Simple aggregate `ExecutionContext` provider for the contributions registered under the given key.

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

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

- - ### Constructor Detail

    - #### CompositeItemStream

          public CompositeItemStream()

  - ### Method Detail

    - #### setStreams

          public void setStreams(ItemStream[] listeners)

      Public setter for the listeners.
      Parameters:
        `listeners` -

    - #### register

          public void register(ItemStream stream)

      Register a `ItemStream` as one of the interesting providers under the provided key.

    - #### update

          public void update(ExecutionContext executionContext)

      Simple aggregate `ExecutionContext` provider for the contributions registered under the given key.
      Specified by:
        `update` in interface `ItemStream`
      Parameters:
        `executionContext` - to be updated
      See Also:
        `ItemStream.update(ExecutionContext)`

    - #### close

          public void close()
                     throws ItemStreamException

      Broadcast the call to close.
      Specified by:
        `close` in interface `ItemStream`
      Throws:
        `ItemStreamException`

    - #### open

          public void open(ExecutionContext executionContext)
                    throws ItemStreamException

      Broadcast the call to open.
      Specified by:
        `open` in interface `ItemStream`
      Parameters:
        `executionContext` - current step's `ExecutionContext`. Will be the executionContext from the last run of the step on a restart.
      Throws:
        `ItemStreamException`