Package com.opencsv.bean.concurrent
Class ProcessCsvBean<T>
java.lang.Object
com.opencsv.bean.concurrent.ProcessCsvBean<T>
- Type Parameters:
T- The type of the bean to be processed
- All Implemented Interfaces:
Runnable
A class for converting one bean into its string representation for writing to
an output.
- Since:
- 4.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Tprivate final CsvExceptionHandlerprivate final longprivate final MappingStrategy<T> private final BlockingQueue<OrderedObject<String[]>> private final BlockingQueue<OrderedObject<CsvException>> -
Constructor Summary
ConstructorsConstructorDescriptionProcessCsvBean(long lineNumber, MappingStrategy<T> mappingStrategy, T bean, BlockingQueue<OrderedObject<String[]>> resultantLineQueue, BlockingQueue<OrderedObject<CsvException>> thrownExceptionsQueue, SortedSet<Long> expectedRecords, CsvExceptionHandler exceptionHandler) The only constructor for creating a line of CSV output out of a bean. -
Method Summary
-
Field Details
-
lineNumber
private final long lineNumber -
mappingStrategy
-
bean
-
resultantLineQueue
-
thrownExceptionsQueue
-
expectedRecords
-
exceptionHandler
-
-
Constructor Details
-
ProcessCsvBean
public ProcessCsvBean(long lineNumber, MappingStrategy<T> mappingStrategy, T bean, BlockingQueue<OrderedObject<String[]>> resultantLineQueue, BlockingQueue<OrderedObject<CsvException>> thrownExceptionsQueue, SortedSet<Long> expectedRecords, CsvExceptionHandler exceptionHandler) The only constructor for creating a line of CSV output out of a bean.- Parameters:
lineNumber- Which record in the output file is being processedmappingStrategy- The mapping strategy to be usedbean- The bean to be transformed into a line of outputresultantLineQueue- A queue in which to place the line createdthrownExceptionsQueue- A queue in which to place a thrown exception, if one is thrownexpectedRecords- A list of outstanding record numbers so gaps in ordering due to filtered input or exceptions while converting can be detected.exceptionHandler- The handler for exceptions thrown during record processing
-
-
Method Details