public abstract class DCFieldProcessor extends java.lang.Object implements DataReceiverIfc, DataProviderIfc, FileDataProviderIfc, FileDataReceiverIfc, java.lang.Runnable
| Constructor and Description |
|---|
DCFieldProcessor()
Constructor for those field processors that do not
automatically create an output type.
|
DCFieldProcessor(java.lang.Class outputDataType)
Constructor which sets the Class of Objects that this
DCFieldProcessor will produce as its output.
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
dataIsAvailable()
Allows a DataProvider to indicate that some data is
available for processing
|
void |
fileDataIsAvailable()
This is just a dummy implementation, any field processor needing the file level transaction behavior should override this method
and implement correct behavior.
|
java.io.File |
getCurrArchFile()
Allows a DataReceiver to obtain the currently processing .arch file
|
abstract DCFieldContainer |
getData()
Allows a DataReceiver to obtain the available data in a
known format.
|
DCFieldContainer |
getData(java.lang.String batch)
Allows a DataReceiver to obtain the available data in a
known format.
|
DataProviderIfc |
getDataProvider()
Gets the object that is holding data for this DataReceiver
|
DataReceiverIfc |
getDataReceiver()
Gets the object that is retrieving data from this DataProvider
|
DiscardedStatisticsMonitorIfc |
getDiscardedCounter() |
DCFieldContainer[] |
getFileBulkData()
Allows a FileDataReceiver to obtain the available data in a
known format.
|
DCFieldContainer |
getFileData()
Allows a FileDataReceiver to obtain the available data in a
known format.
|
FileDataProviderIfc |
getFileDataProvider()
Gets the object that is holding data for this FileDataReceiver
|
FileDataReceiverIfc |
getFileDataReceiver()
Gets the object that is retrieving data from this FileDataProvider
|
java.lang.Class |
getOutputType()
Returns the Class of the objects that this FieldProcessor
will produce as output.
|
boolean |
getPollForData() |
java.lang.String |
getProcessedArchFile()
Allows a DataReceiver to obtain the last processed .arch file
|
void |
handleRejectOfFile()
To handle the remaining input files when there is reject of a file
|
abstract boolean |
isDataAvailable()
Allows a DataReceiver to determine whether some data is
available for processing
|
boolean |
isEndOfFile()
This is just a dummy implementation, any field processor needing the file level transaction behavior should override this method
and implement correct behavior.
|
boolean |
isFileDataAvailable()
This is just a dummy implementation, any field processor needing the file level transaction behavior should override this method
and implement correct behavior.
|
boolean |
isStartOfFile()
Determines if the record received is start of file indication
|
java.lang.String |
openInputFile() |
abstract void |
processData(DCFieldContainer inputData)
Manipulates the data provided by its DataProvider
|
boolean |
processEndOfFileData(java.lang.String transactionID)
This is just a dummy implementation, any field processor needing the file level transaction behavior should override this method
and implement correct behavior.
|
boolean |
processFileData(DCFieldContainer data)
This is just a dummy implementation, any field processor needing the file level transaction behavior should override this method
and implement correct behavior.
|
boolean |
processFileData(DCFieldContainer[] data)
This is just a dummy implementation, any field processor needing the file level transaction behavior should override this method
and implement correct behavior.
|
boolean |
processRejectFile()
This is just a dummy implementation, any field processor needing the file level transaction behavior should override this method
and implement correct behavior.
|
boolean |
processStartOfFileData(java.lang.String originalFileName)
This is just a dummy implementation, any field processor needing the file level transaction behavior should override this method
and implement correct behavior.
|
boolean |
rejectFile()
Indicates data provider to stop reading from the input file and reject it
|
void |
removeProcessedFile(java.io.File currArchFile)
Allows a DataReceiver to remove .arch file once processed
currArchFile - processed .arch file
|
abstract void |
run() |
void |
setbulkIOConfig(boolean bulkio) |
void |
setBulkProcessing(boolean b) |
void |
setDataProvider(DataProviderIfc provider)
Sets the object from which this DataReceiver will obtain
its data.
|
void |
setDataReceiver(DataReceiverIfc receiver)
Sets the object to which this DataProvider will send
its data.
|
void |
setDiscardedCounter(DiscardedStatisticsMonitorIfc discardedCounter) |
void |
setFileDataProvider(FileDataProviderIfc provider)
Sets the object from which this FileDataReceiver will obtain
its data.
|
void |
setFileDataReceiver(FileDataReceiverIfc receiver)
Sets the object to which this FileDataProvider will send
its data.
|
void |
setMultiThreadConfig(boolean mtChecked,
boolean isOrdered,
int numThreads) |
void |
setOutputType(java.lang.Class type)
Sets the Class of the objects that this FieldProcessor
will produce as output.
|
void |
setPollForData() |
void |
setProcessedArchFile(java.lang.String file)
Sets the processed .arch file absolute path
|
void |
setTransactionID(java.lang.String tID) |
abstract void |
shutdown()
Performs all steps necessary to gracefully stop this FieldProcessor.
|
void |
signalBatchCompletion(java.lang.String batch)
Allows a DataReceiver to know that the nars under the specified batch are
completed and handed over to the Data receiver
|
boolean |
validOIMinorType()
Allows a DataReceiver to check if Minor Type supported for disaster
recovery
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprocessDatagetBulkDatapublic DCFieldProcessor(java.lang.Class outputDataType)
outputDataType - Class of Objects that this
DCFieldProcessor should produce.
This class must implement the
DCFieldContainer interface.public DCFieldProcessor()
public abstract void run()
run in interface java.lang.Runnablepublic abstract void shutdown()
public abstract boolean isDataAvailable()
DataProviderIfcisDataAvailable in interface DataProviderIfctrue, if data is availablepublic abstract DCFieldContainer getData()
DataProviderIfcgetData in interface DataProviderIfcpublic DCFieldContainer getData(java.lang.String batch)
DataProviderIfcgetData in interface DataProviderIfcpublic DataReceiverIfc getDataReceiver()
DataProviderIfcgetDataReceiver in interface DataProviderIfcpublic void setDataReceiver(DataReceiverIfc receiver)
DataProviderIfcsetDataReceiver in interface DataProviderIfcreceiver - Object which will obtain data from this
DataProviderpublic void signalBatchCompletion(java.lang.String batch)
DataProviderIfcsignalBatchCompletion in interface DataProviderIfcpublic void setFileDataReceiver(FileDataReceiverIfc receiver)
FileDataProviderIfcsetFileDataReceiver in interface FileDataProviderIfcreceiver - Object which will obtain data from this
FileDataProviderpublic FileDataReceiverIfc getFileDataReceiver()
FileDataProviderIfcgetFileDataReceiver in interface FileDataProviderIfcpublic void setFileDataProvider(FileDataProviderIfc provider)
FileDataReceiverIfcsetFileDataProvider in interface FileDataReceiverIfcprovider - Object which has data that needs to be
retrieved by this DataReceiverpublic FileDataProviderIfc getFileDataProvider()
FileDataReceiverIfcgetFileDataProvider in interface FileDataReceiverIfcpublic abstract void dataIsAvailable()
DataReceiverIfcdataIsAvailable in interface DataReceiverIfcpublic abstract void processData(DCFieldContainer inputData) throws NodeProcessingException
DataReceiverIfcprocessData in interface DataReceiverIfcNodeProcessingExceptionpublic void fileDataIsAvailable()
fileDataIsAvailable in interface FileDataReceiverIfcpublic boolean processStartOfFileData(java.lang.String originalFileName)
throws NodeProcessingException
processStartOfFileData in interface FileDataReceiverIfctrue, if data is availableNodeProcessingExceptionpublic boolean processFileData(DCFieldContainer data) throws NodeProcessingException, FileRejectException
processFileData in interface FileDataReceiverIfctrue, if data is processed successfullyNodeProcessingExceptionFileRejectExceptionpublic boolean processFileData(DCFieldContainer[] data) throws NodeProcessingException
processFileData in interface FileDataReceiverIfctrue, if data is processed successfullyNodeProcessingExceptionpublic boolean processEndOfFileData(java.lang.String transactionID)
throws NodeProcessingException
processEndOfFileData in interface FileDataReceiverIfctrue , if processed successfullyNodeProcessingExceptionpublic boolean processRejectFile()
throws NodeProcessingException
processRejectFile in interface FileDataReceiverIfctrue , if processed successfullyNodeProcessingExceptionpublic boolean isFileDataAvailable()
isFileDataAvailable in interface FileDataProviderIfctrue, if data is availablepublic boolean isEndOfFile()
isEndOfFile in interface FileDataProviderIfctrue, if data is availablepublic boolean isStartOfFile()
FileDataProviderIfcisStartOfFile in interface FileDataProviderIfcpublic DCFieldContainer getFileData()
FileDataProviderIfcgetFileData in interface FileDataProviderIfcpublic DCFieldContainer[] getFileBulkData()
FileDataProviderIfcgetFileBulkData in interface FileDataProviderIfcpublic void setPollForData()
public boolean getPollForData()
public DataProviderIfc getDataProvider()
DataReceiverIfcgetDataProvider in interface DataReceiverIfcpublic void setDataProvider(DataProviderIfc provider)
DataReceiverIfcsetDataProvider in interface DataReceiverIfcprovider - Object which has data that needs to be
retrieved by this DataReceiverpublic java.lang.Class getOutputType()
public void setOutputType(java.lang.Class type)
DCFieldContainerpublic DiscardedStatisticsMonitorIfc getDiscardedCounter()
public void setDiscardedCounter(DiscardedStatisticsMonitorIfc discardedCounter)
public void setMultiThreadConfig(boolean mtChecked,
boolean isOrdered,
int numThreads)
public void setBulkProcessing(boolean b)
public boolean rejectFile()
FileDataProviderIfcrejectFile in interface FileDataProviderIfc true for successful rejection of input filepublic java.lang.String openInputFile()
throws java.lang.Exception
openInputFile in interface FileDataProviderIfcjava.lang.Exceptionpublic void handleRejectOfFile()
FileDataProviderIfchandleRejectOfFile in interface FileDataProviderIfcpublic void setTransactionID(java.lang.String tID)
setTransactionID in interface FileDataReceiverIfcpublic java.io.File getCurrArchFile()
DataProviderIfcgetCurrArchFile in interface DataProviderIfcpublic java.lang.String getProcessedArchFile()
DataProviderIfcgetProcessedArchFile in interface DataProviderIfcpublic void setProcessedArchFile(java.lang.String file)
DataProviderIfcsetProcessedArchFile in interface DataProviderIfcfile - absolute path of processed .arch filepublic void removeProcessedFile(java.io.File currArchFile)
DataProviderIfcremoveProcessedFile in interface DataProviderIfcpublic boolean validOIMinorType()
DataProviderIfcvalidOIMinorType in interface DataProviderIfcpublic void setbulkIOConfig(boolean bulkio)