Top Description Fields Constructors Methods
com.opencsv.bean.concurrent

public Class ProcessCsvBean<T>

extends Object
implements Runnable
Class Inheritance
All Implemented Interfaces
java.lang.Runnable
Type Parameters
<T>
The type of the bean to be processed
Imports
com.opencsv.bean.MappingStrategy, com.opencsv.bean.exceptionhandler.CsvExceptionHandler, com.opencsv.bean.util.OpencsvUtils, .OrderedObject, com.opencsv.exceptions.CsvChainedException, .CsvException, .CsvFieldAssignmentException, .CsvRuntimeException, java.util.SortedSet, java.util.concurrent.BlockingQueue

A class for converting one bean into its string representation for writing to an output.
Author
Andrew Rucker Jones
Since
4.0

Field Summary

Modifier and TypeField and Description
private final T
private final CsvExceptionHandler
private final SortedSet<Long>
private final long
private final MappingStrategy<T>
private final BlockingQueue<OrderedObject<String[]>>
private final BlockingQueue<OrderedObject<CsvException>>

Constructor Summary

AccessConstructor and Description
public
ProcessCsvBean(long
Which record in the output file is being processed
lineNumber
,
MappingStrategy<T>
The mapping strategy to be used
mappingStrategy
,
T
The bean to be transformed into a line of output
bean
,
BlockingQueue<OrderedObject<String[]>>
A queue in which to place the line created
resultantLineQueue
,
BlockingQueue<OrderedObject<CsvException>>
A queue in which to place a thrown exception, if one is thrown
thrownExceptionsQueue
,
SortedSet<Long>
A list of outstanding record numbers so gaps in ordering due to filtered input or exceptions while converting can be detected.
expectedRecords
,
CsvExceptionHandler
The handler for exceptions thrown during record processing
exceptionHandler
)

The only constructor for creating a line of CSV output out of a bean.

Method Summary

Modifier and TypeMethod and Description
public void
run()

Implements java.lang.Runnable.run.

Runs this operation.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

beanback to summary
private final T bean
exceptionHandlerback to summary
private final CsvExceptionHandler exceptionHandler
expectedRecordsback to summary
private final SortedSet<Long> expectedRecords
lineNumberback to summary
private final long lineNumber
mappingStrategyback to summary
private final MappingStrategy<T> mappingStrategy
resultantLineQueueback to summary
private final BlockingQueue<OrderedObject<String[]>> resultantLineQueue
thrownExceptionsQueueback to summary
private final BlockingQueue<OrderedObject<CsvException>> thrownExceptionsQueue

Constructor Detail

ProcessCsvBeanback to summary
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:long

Which record in the output file is being processed

mappingStrategy:MappingStrategy<T>

The mapping strategy to be used

bean:T

The bean to be transformed into a line of output

resultantLineQueue:BlockingQueue<OrderedObject<String[]>>

A queue in which to place the line created

thrownExceptionsQueue:BlockingQueue<OrderedObject<CsvException>>

A queue in which to place a thrown exception, if one is thrown

expectedRecords:SortedSet<Long>

A list of outstanding record numbers so gaps in ordering due to filtered input or exceptions while converting can be detected.

exceptionHandler:CsvExceptionHandler

The handler for exceptions thrown during record processing

Method Detail

runback to summary
public void run()

Implements java.lang.Runnable.run.

Doc from java.lang.Runnable.run.

Runs this operation.

Annotations
@Override