Package com.nt.udc.ei.node.nar
Class NAREIFileProcessor
java.lang.Object
com.nt.udc.ndk.node.EITransport
com.nt.udc.ei.transport.FileEITransport
com.nt.udc.ei.node.nar.NAREIFileProcessor
- All Implemented Interfaces:
DataProviderIfc
,DCTransport
,FileDataProviderIfc
,Runnable
This class represents the Transport used by the NAR EI Node.
The parent class FileEITransport handles the management
of the input files, we just need to be able to read the
contents of the file.
-
Field Summary
FieldsFields inherited from class com.nt.udc.ei.transport.FileEITransport
DEFAULT_POLLING_INTERVAL, DELETE_LOCAL_FILES, deleteLocalFiles, fileLevelTransaction, fileSeqCheck, fsChecked, INPUT_BACKUP_DIR, ioLock, isOrdered, itsFileSuffix, localDir, logger, mtChecked, MULTI_THREADED, ORDER_REQUIRED, POLLING_INTERVAL, scratchDir, useSynchronizedDirectory
Fields inherited from class com.nt.udc.ndk.node.EITransport
dataReceiver, fdChecked, filedataReceiver, fileduplicateCheck, fileToProcess, inputCount, lockFile, movedFile, node, pollingInterval, processing, processingData, running
-
Constructor Summary
ConstructorsConstructorDescriptionNAREIFileProcessor
(EINode node, SynchronizedDirectory sd, String suffix, com.nt.common.util.SMGLock lock) Constructor used when using FTP to retrieve the files that need to be processed.NAREIFileProcessor
(EINode node, File localdir, String suffix, com.nt.common.util.SMGLock lock) Constructor used when the files are pushed to a local directory by an outside source. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
processFiles
(Vector filesToProcess) Here's where we actually parse the files and extract the data of interest.protected void
processFilesOrdered
(File currFile) Methods inherited from class com.nt.udc.ei.transport.FileEITransport
deleteLocalFiles, getActFilter, getBulkData, getData, getInputBackupDir, getLength, isDataAvailable, isHealthy, isLessThan, moveCurrentFileToBackUp, readLength, run, setActFilter, setDubCheckObj, setDupCheckFlag, setSeqCheckFlag, setSeqCheckObj, shutdown, sortFiles, writeLength, writeLength
Methods inherited from class com.nt.udc.ndk.node.EITransport
getCurrArchFile, getData, getDataReceiver, getDubCheckObj, getDupCheckFlag, getFileBulkData, getFileData, getFileDataReceiver, getFileList, getMovedFileStatus, getNode, getPollingInterval, getProcessedArchFile, handleRejectOfFile, incrementIn, incrementIn, isEndOfFile, isFileDataAvailable, isProcessing, isProcessingData, isStartOfFile, openInputFile, rejectFile, removeProcessedFile, setCountsSuspect, setDataReceiver, setFileDataReceiver, setFileToProcess, setMovedFileStatus, setNode, setPollingInterval, setProcessedArchFile, setProcessing, signalBatchCompletion, validOIMinorType
-
Field Details
-
FILENAME_NAR_ID
- See Also:
-
-
Constructor Details
-
NAREIFileProcessor
public NAREIFileProcessor(EINode node, File localdir, String suffix, com.nt.common.util.SMGLock lock) throws NodeStartException Constructor used when the files are pushed to a local directory by an outside source.- Parameters:
node
- The EI node which is using this object.localdir
- The local directory where the input files can be found.suffix
- The file suffix used to identify the files that need to be processed (can be null if you want to process all files in the directory).lock
- Used to properly shutdown the EI and all its threads.- Throws:
NodeStartException
- Used to signal the EI Node that there was a problem getting things going.
-
NAREIFileProcessor
public NAREIFileProcessor(EINode node, SynchronizedDirectory sd, String suffix, com.nt.common.util.SMGLock lock) throws NodeStartException Constructor used when using FTP to retrieve the files that need to be processed.- Parameters:
node
- The EI node which is using this object.sd
- The representation of the local directory where the target files can be found.suffix
- The file suffix used to identify the files that need to be processed (can be null if you want to process all files in the directory).lock
- Used to properly shutdown the EI and all its threads.- Throws:
NodeStartException
- Used to signal the EI Node that there was a problem getting things going.
-
-
Method Details
-
processFiles
Here's where we actually parse the files and extract the data of interest.- Specified by:
processFiles
in classFileEITransport
- Parameters:
filesToProcess
- List of filenames that need to be processed
-
processFilesOrdered
-