org.springframework.batch.item
Interface ItemStream

All Known Subinterfaces:
ItemStreamReader<T>, ItemStreamWriter<T>, ResourceAwareItemReaderItemStream<T>, ResourceAwareItemWriterItemStream<T>
All Known Implementing Classes:
AbstractCursorItemReader, AbstractItemCountingItemStreamItemReader, AbstractItemStreamItemReader, AbstractItemStreamItemWriter, AbstractPagingItemReader, CompositeItemStream, CompositeItemWriter, FlatFileItemReader, FlatFileItemWriter, HibernateCursorItemReader, HibernatePagingItemReader, IbatisPagingItemReader, ItemStreamSupport, JdbcCursorItemReader, JdbcPagingItemReader, JpaPagingItemReader, MultiResourceItemReader, MultiResourceItemWriter, ResourcesItemReader, SingleItemPeekableItemReader, StaxEventItemReader, StaxEventItemWriter, StoredProcedureItemReader

public interface ItemStream

Marker interface defining a contract for periodically storing state and restoring from that state should an error occur.

Author:
Dave Syer, Lucas Ward

Method Summary
 void close()
          If any resources are needed for the stream to operate they need to be destroyed here.
 void open(ExecutionContext executionContext)
          Open the stream for the provided ExecutionContext.
 void update(ExecutionContext executionContext)
          Indicates that the execution context provided during open is about to be saved.
 

Method Detail

open

void open(ExecutionContext executionContext)
          throws ItemStreamException
Open the stream for the provided ExecutionContext.

Throws:
IllegalArgumentException - if context is null
ItemStreamException

update

void update(ExecutionContext executionContext)
            throws ItemStreamException
Indicates that the execution context provided during open is about to be saved. If any state is remaining, but has not been put in the context, it should be added here.

Parameters:
executionContext - to be updated
Throws:
IllegalArgumentException - if executionContext is null.
ItemStreamException

close

void close()
           throws ItemStreamException
If any resources are needed for the stream to operate they need to be destroyed here. Once this method has been called all other methods (except open) may throw an exception.

Throws:
ItemStreamException


Copyright © 2013 SpringSource. All Rights Reserved.