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:
java.lang.Runnable
public class ProcessCsvBean<T> extends java.lang.Object implements java.lang.Runnable
A class for converting one bean into its string representation for writing to an output.- Since:
- 4.0
-
-
Field Summary
Fields Modifier and Type Field Description private T
bean
private CsvExceptionHandler
exceptionHandler
private java.util.SortedSet<java.lang.Long>
expectedRecords
private long
lineNumber
private MappingStrategy<T>
mappingStrategy
private java.util.concurrent.BlockingQueue<OrderedObject<java.lang.String[]>>
resultantLineQueue
private java.util.concurrent.BlockingQueue<OrderedObject<CsvException>>
thrownExceptionsQueue
-
Constructor Summary
Constructors Constructor Description ProcessCsvBean(long lineNumber, MappingStrategy<T> mappingStrategy, T bean, java.util.concurrent.BlockingQueue<OrderedObject<java.lang.String[]>> resultantLineQueue, java.util.concurrent.BlockingQueue<OrderedObject<CsvException>> thrownExceptionsQueue, java.util.SortedSet<java.lang.Long> expectedRecords, CsvExceptionHandler exceptionHandler)
The only constructor for creating a line of CSV output out of a bean.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
run()
-
-
-
Field Detail
-
lineNumber
private final long lineNumber
-
mappingStrategy
private final MappingStrategy<T> mappingStrategy
-
bean
private final T bean
-
resultantLineQueue
private final java.util.concurrent.BlockingQueue<OrderedObject<java.lang.String[]>> resultantLineQueue
-
thrownExceptionsQueue
private final java.util.concurrent.BlockingQueue<OrderedObject<CsvException>> thrownExceptionsQueue
-
expectedRecords
private final java.util.SortedSet<java.lang.Long> expectedRecords
-
exceptionHandler
private final CsvExceptionHandler exceptionHandler
-
-
Constructor Detail
-
ProcessCsvBean
public ProcessCsvBean(long lineNumber, MappingStrategy<T> mappingStrategy, T bean, java.util.concurrent.BlockingQueue<OrderedObject<java.lang.String[]>> resultantLineQueue, java.util.concurrent.BlockingQueue<OrderedObject<CsvException>> thrownExceptionsQueue, java.util.SortedSet<java.lang.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
-
-