Class MXNarOutReceiverWrapper
java.lang.Object
com.metasolv.nm.processor.MXAggregator.MXNarOutReceiverWrapper
- All Implemented Interfaces:
DataProviderIfc
,DataReceiverIfc
,DCStreamHandler
,FileDataProviderIfc
,FileDataReceiverIfc
Make a DCStreamHandler-derived class for use by FlexibleTableFlush, which only uses
the writeData() methods.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
cleanup()
Performs any necessary cleanup desired, such as deleting files that have been processed.void
void
Allows a DataProvider to indicate that some data is available for processingvoid
Allows a FileDataProvider to indicate that some data is available for processingAllows a DataReceiver to obtain the available data in a known format.Allows a DataReceiver to obtain the currently processing .arch filegetData()
Allows a DataReceiver to obtain the available data in a known format.Allows a DataReceiver to obtain the available data in a known format.Gets the object that is holding data for this DataReceiverGets the object that is retrieving data from this DataProviderAllows a FileDataReceiver to obtain the available data in a known format.Allows a FileDataReceiver to obtain the available data in a known format.Gets the object that is holding data for this FileDataReceiverGets the object that is retrieving data from this FileDataProviderReturns a DCNodePerformance object containing node performance data.Allows a DataReceiver to obtain the last processed .arch filevoid
To handle the remaining input files when there is reject of a fileboolean
Allows a DataReceiver to determine whether some data is available for processingboolean
Determines if record received is an End of file indicationboolean
Allows a FileDataReceiver to determine whether some file is available for processingboolean
Determines if the record received is start of file indicationvoid
moveToReadyToOut
(boolean initNew) Make cache file as ready to moveToOutput()void
processData
(DCFieldContainer data) Manipulates the data provided by its DataProvidervoid
processData
(DCFieldContainer[] data) Manipulates the set of data provided by its DataProviderboolean
processEndOfFileData
(String transactionID) Allows FileDataProvider to indicate end of file recordboolean
Manipulates the data provided by its DataProviderboolean
processFileData
(DCFieldContainer[] data) Manipulates the set of data provided by its DataProviderboolean
Allows FileDataProvider to indicate rejection of the fileboolean
processStartOfFileData
(String originalFileName) Allows FileDataProvider to indicate start of fileReads a set of DCFieldContainer objects from this DataProvider.readData()
Reads a DCFieldContainer object from this DataProviderboolean
Indicates data provider to stop reading from the input file and reject itvoid
removeProcessedFile
(File currArchFile) Allows a DataReceiver to remove .arch file once processed currArchFile - processed .arch filevoid
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
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
setProcessedArchFile
(String file) Sets the processed .arch file absolute pathvoid
setTransactionID
(String tID) void
shutdown()
Performs any tasks necessary to cleanly shutdown the input and output streams of the stream handler, as appropriatevoid
Performs any tasks necessary to cleanly shutdown the input stream of the stream handlervoid
Performs any tasks necessary to cleanly shutdown the output stream of the stream handlervoid
signalBatchCompletion
(String batch) Allows a DataReceiver to know that the nars under the specified batch are completed and handed over to the Data receiverboolean
Allows a DataReceiver to check if Minor Type supported for disaster recoveryboolean
writeData
(DCFieldContainer datum) Stores information into a DCFieldContainer objectboolean
writeData
(DCFieldContainer[] data) Stores information into multiple DCFieldContainer objects
-
Constructor Details
-
MXNarOutReceiverWrapper
-
-
Method Details
-
writeData
Description copied from interface:DCStreamHandler
Stores information into a DCFieldContainer object- Specified by:
writeData
in interfaceDCStreamHandler
- Parameters:
datum
- Object to put the information into- Returns:
true
, if the data was successfully written to the object
-
writeData
Description copied from interface:DCStreamHandler
Stores information into multiple DCFieldContainer objects- Specified by:
writeData
in interfaceDCStreamHandler
- Returns:
true
, if the data was successfully written to the object
-
readData
Description copied from interface:DCStreamHandler
Reads a DCFieldContainer object from this DataProvider- Specified by:
readData
in interfaceDCStreamHandler
-
readBulkData
Description copied from interface:DCStreamHandler
Reads a set of DCFieldContainer objects from this DataProvider.- Specified by:
readBulkData
in interfaceDCStreamHandler
- Returns:
- DCFieldContainer objects, if available; null otherwise
-
getPerformanceMetrics
Description copied from interface:DCStreamHandler
Returns a DCNodePerformance object containing node performance data.- Specified by:
getPerformanceMetrics
in interfaceDCStreamHandler
- Returns:
- DCNodePerformance object,
-
cleanup
public boolean cleanup()Description copied from interface:DCStreamHandler
Performs any necessary cleanup desired, such as deleting files that have been processed.- Specified by:
cleanup
in interfaceDCStreamHandler
-
shutdown
public void shutdown()Description copied from interface:DCStreamHandler
Performs any tasks necessary to cleanly shutdown the input and output streams of the stream handler, as appropriate- Specified by:
shutdown
in interfaceDCStreamHandler
-
shutdownInput
public void shutdownInput()Description copied from interface:DCStreamHandler
Performs any tasks necessary to cleanly shutdown the input stream of the stream handler- Specified by:
shutdownInput
in interfaceDCStreamHandler
-
shutdownOutput
public void shutdownOutput()Description copied from interface:DCStreamHandler
Performs any tasks necessary to cleanly shutdown the output stream of the stream handler- Specified by:
shutdownOutput
in interfaceDCStreamHandler
-
dataIsAvailable
public void dataIsAvailable()Description copied from interface:DataReceiverIfc
Allows a DataProvider to indicate that some data is available for processing- Specified by:
dataIsAvailable
in interfaceDataReceiverIfc
-
processData
Description copied from interface:DataReceiverIfc
Manipulates the data provided by its DataProvider- Specified by:
processData
in interfaceDataReceiverIfc
- Throws:
NodeProcessingException
-
processData
Description copied from interface:DataReceiverIfc
Manipulates the set of data provided by its DataProvider- Specified by:
processData
in interfaceDataReceiverIfc
- Throws:
NodeProcessingException
-
setDataProvider
Description copied from interface:DataReceiverIfc
Sets the object from which this DataReceiver will obtain its data.- Specified by:
setDataProvider
in interfaceDataReceiverIfc
- Parameters:
provider
- Object which has data that needs to be retrieved by this DataReceiver
-
getDataProvider
Description copied from interface:DataReceiverIfc
Gets the object that is holding data for this DataReceiver- Specified by:
getDataProvider
in interfaceDataReceiverIfc
- Returns:
- Object from which this DataReceiver is retrieving data
-
isDataAvailable
public boolean isDataAvailable()Description copied from interface:DataProviderIfc
Allows a DataReceiver to determine whether some data is available for processing- Specified by:
isDataAvailable
in interfaceDataProviderIfc
- Returns:
true
, if data is available
-
getData
Description copied from interface:DataProviderIfc
Allows a DataReceiver to obtain the available data in a known format.- Specified by:
getData
in interfaceDataProviderIfc
- Returns:
- DCFieldContainer object containing the data that is available for processing
-
getBulkData
Description copied from interface:DataProviderIfc
Allows a DataReceiver to obtain the available data in a known format.- Specified by:
getBulkData
in interfaceDataProviderIfc
- Returns:
- DCFieldContainer object array, containing the data that is for processing
-
setDataReceiver
Description copied from interface:DataProviderIfc
Sets the object to which this DataProvider will send its data.- Specified by:
setDataReceiver
in interfaceDataProviderIfc
- Parameters:
receiver
- Object which will obtain data from this DataProvider
-
getDataReceiver
Description copied from interface:DataProviderIfc
Gets the object that is retrieving data from this DataProvider- Specified by:
getDataReceiver
in interfaceDataProviderIfc
- Returns:
- Object to which this DataProvider is sending data
-
moveToReadyToOut
public void moveToReadyToOut(boolean initNew) Description copied from interface:DCStreamHandler
Make cache file as ready to moveToOutput()- Specified by:
moveToReadyToOut
in interfaceDCStreamHandler
-
createNewCacheFile
public void createNewCacheFile()- Specified by:
createNewCacheFile
in interfaceDCStreamHandler
-
isFileDataAvailable
public boolean isFileDataAvailable()Description copied from interface:FileDataProviderIfc
Allows a FileDataReceiver to determine whether some file is available for processing- Specified by:
isFileDataAvailable
in interfaceFileDataProviderIfc
- Returns:
true
, if data is available
-
isEndOfFile
public boolean isEndOfFile()Description copied from interface:FileDataProviderIfc
Determines if record received is an End of file indication- Specified by:
isEndOfFile
in interfaceFileDataProviderIfc
- Returns:
true
, if data is available
-
isStartOfFile
public boolean isStartOfFile()Description copied from interface:FileDataProviderIfc
Determines if the record received is start of file indication- Specified by:
isStartOfFile
in interfaceFileDataProviderIfc
- Returns:
-
getFileData
Description copied from interface:FileDataProviderIfc
Allows a FileDataReceiver to obtain the available data in a known format.- Specified by:
getFileData
in interfaceFileDataProviderIfc
- Returns:
- DCFieldContainer object containing the data that is available for processing
-
getFileBulkData
Description copied from interface:FileDataProviderIfc
Allows a FileDataReceiver to obtain the available data in a known format.- Specified by:
getFileBulkData
in interfaceFileDataProviderIfc
- Returns:
- DCFieldContainer object array, containing the data that is for processing
-
setFileDataReceiver
Description copied from interface:FileDataProviderIfc
Sets the object to which this FileDataProvider will send its data.- Specified by:
setFileDataReceiver
in interfaceFileDataProviderIfc
- Parameters:
receiver
- Object which will obtain data from this FileDataProvider
-
getFileDataReceiver
Description copied from interface:FileDataProviderIfc
Gets the object that is retrieving data from this FileDataProvider- Specified by:
getFileDataReceiver
in interfaceFileDataProviderIfc
- Returns:
- Object to which this FileDataProvider is sending data
-
fileDataIsAvailable
public void fileDataIsAvailable()Description copied from interface:FileDataReceiverIfc
Allows a FileDataProvider to indicate that some data is available for processing- Specified by:
fileDataIsAvailable
in interfaceFileDataReceiverIfc
-
processStartOfFileData
Description copied from interface:FileDataReceiverIfc
Allows FileDataProvider to indicate start of file- Specified by:
processStartOfFileData
in interfaceFileDataReceiverIfc
- Returns:
true
, if data is available- Throws:
NodeProcessingException
-
processFileData
Description copied from interface:FileDataReceiverIfc
Manipulates the data provided by its DataProvider- Specified by:
processFileData
in interfaceFileDataReceiverIfc
- Returns:
true
, if data is processed successfully- Throws:
NodeProcessingException
-
processFileData
Description copied from interface:FileDataReceiverIfc
Manipulates the set of data provided by its DataProvider- Specified by:
processFileData
in interfaceFileDataReceiverIfc
- Returns:
true
, if data is processed successfully- Throws:
NodeProcessingException
-
processEndOfFileData
Description copied from interface:FileDataReceiverIfc
Allows FileDataProvider to indicate end of file record- Specified by:
processEndOfFileData
in interfaceFileDataReceiverIfc
- Returns:
true
, if processed successfully- Throws:
NodeProcessingException
-
processRejectFile
Description copied from interface:FileDataReceiverIfc
Allows FileDataProvider to indicate rejection of the file- Specified by:
processRejectFile
in interfaceFileDataReceiverIfc
- Returns:
true
, if processed successfully- Throws:
NodeProcessingException
-
setFileDataProvider
Description copied from interface:FileDataReceiverIfc
Sets the object from which this FileDataReceiver will obtain its data.- Specified by:
setFileDataProvider
in interfaceFileDataReceiverIfc
- Parameters:
provider
- Object which has data that needs to be retrieved by this DataReceiver
-
getFileDataProvider
Description copied from interface:FileDataReceiverIfc
Gets the object that is holding data for this FileDataReceiver- Specified by:
getFileDataProvider
in interfaceFileDataReceiverIfc
- Returns:
- Object from which this DataReceiver is retrieving data
-
openInputFile
- Specified by:
openInputFile
in interfaceFileDataProviderIfc
- Returns:
- Throws:
Exception
-
rejectFile
Description copied from interface:FileDataProviderIfc
Indicates data provider to stop reading from the input file and reject it- Specified by:
rejectFile
in interfaceFileDataProviderIfc
- Returns:
true
for successful rejection of input file
- Throws:
Exception
-
handleRejectOfFile
public void handleRejectOfFile()Description copied from interface:FileDataProviderIfc
To handle the remaining input files when there is reject of a file- Specified by:
handleRejectOfFile
in interfaceFileDataProviderIfc
-
setTransactionID
- Specified by:
setTransactionID
in interfaceFileDataReceiverIfc
-
getData
Description copied from interface:DataProviderIfc
Allows a DataReceiver to obtain the available data in a known format. batch - The nars read will be grouped under the specified batch- Specified by:
getData
in interfaceDataProviderIfc
- Returns:
- DCFieldContainer object containing the data that is available for processing
-
signalBatchCompletion
Description copied from interface:DataProviderIfc
Allows a DataReceiver to know that the nars under the specified batch are completed and handed over to the Data receiver- Specified by:
signalBatchCompletion
in interfaceDataProviderIfc
-
removeProcessedFile
Description copied from interface:DataProviderIfc
Allows a DataReceiver to remove .arch file once processed currArchFile - processed .arch file- Specified by:
removeProcessedFile
in interfaceDataProviderIfc
-
getCurrArchFile
Description copied from interface:DataProviderIfc
Allows a DataReceiver to obtain the currently processing .arch file- Specified by:
getCurrArchFile
in interfaceDataProviderIfc
- Returns:
- currently processing .arch file
-
getProcessedArchFile
Description copied from interface:DataProviderIfc
Allows a DataReceiver to obtain the last processed .arch file- Specified by:
getProcessedArchFile
in interfaceDataProviderIfc
- Returns:
- currently processing .arch file absolute path
-
setProcessedArchFile
Description copied from interface:DataProviderIfc
Sets the processed .arch file absolute path- Specified by:
setProcessedArchFile
in interfaceDataProviderIfc
- Parameters:
file
- absolute path of processed .arch file
-
validOIMinorType
public boolean validOIMinorType()Description copied from interface:DataProviderIfc
Allows a DataReceiver to check if Minor Type supported for disaster recovery- Specified by:
validOIMinorType
in interfaceDataProviderIfc
- Returns:
- true if valid
-