Package org.dbunit.dataset.stream
Class DataSetProducerAdapter
java.lang.Object
org.dbunit.dataset.stream.DataSetProducerAdapter
- All Implemented Interfaces:
IDataSetProducer
- Since:
- Apr 17, 2003
- Version:
- $Revision$ $Date$
- Author:
- Manuel Laflamme, Last changed by: $Author$
-
Constructor Summary
ConstructorsConstructorDescriptionDataSetProducerAdapter(IDataSet dataSet) Creates a producer that reports the tables of the given dataset.DataSetProducerAdapter(ITableIterator iterator) Creates a producer that reports the tables of the given iterator. -
Method Summary
Modifier and TypeMethodDescriptionvoidproduce()Process this dataset source.voidsetConsumer(IDataSetConsumer consumer) Sets the consumer notified of this producer's dataset content.
-
Constructor Details
-
DataSetProducerAdapter
Creates a producer that reports the tables of the given iterator.- Parameters:
iterator- the iterator providing the tables to produce.
-
DataSetProducerAdapter
Creates a producer that reports the tables of the given dataset.- Parameters:
dataSet- the dataset providing the tables to produce.- Throws:
DataSetException- if the dataset's iterator cannot be created.
-
-
Method Details
-
setConsumer
Description copied from interface:IDataSetProducerSets the consumer notified of this producer's dataset content.- Specified by:
setConsumerin interfaceIDataSetProducer- Parameters:
consumer- the consumer to notify.- Throws:
DataSetException- if the consumer cannot be set.
-
produce
Description copied from interface:IDataSetProducerProcess this dataset source. During the processing, the IDataSetProducer will provide information about the dataset through the specified event listener.This method is synchronous: it will not return until processing has ended. If a client application wants to terminate parsing early, it should throw an exception from the listener.
- Specified by:
producein interfaceIDataSetProducer- Throws:
DataSetException- if processing the dataset source fails.
-