Package com.nt.udc.ei.node.ffei
Class FlatFileEIProcessor
java.lang.Object
com.nt.udc.ndk.node.EITransport
com.nt.udc.ei.transport.FileEITransport
com.nt.udc.ndk.node.GenericFlatFileProcessor
com.nt.udc.ei.node.ffei.FlatFileEIProcessor
- All Implemented Interfaces:
DataProviderIfc
,DCTransport
,FileDataProviderIfc
,Runnable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected GenericFlatFileRecord
Override the record as defined in the Generic class.Fields inherited from class com.nt.udc.ndk.node.GenericFlatFileProcessor
actfile, br, debug, fileName, FILENAME_NAR_ID, INPUT_BACKUP_DIR, inputStream, lineOfText, m_bCRLFTerminatorEnabled, m_bCRTerminatorEnabled, m_bLFTerminatorEnabled, numBytes, PROCESSED_FILE_PREFIX, PROCESSED_FILE_SUFFIX, rawHeader, recoveryFile, scratchFile, UNICODE_TRANSFORMATION_FORMAT
Fields inherited from class com.nt.udc.ei.transport.FileEITransport
DEFAULT_POLLING_INTERVAL, DELETE_LOCAL_FILES, deleteLocalFiles, fileLevelTransaction, fileSeqCheck, fsChecked, 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
ConstructorsConstructorDescriptionFlatFileEIProcessor
(EINode node, SynchronizedDirectory sd, String suffix, com.nt.common.util.SMGLock lock) Use this constructor when using FTP to retrieve the accounting files that need to be processed.FlatFileEIProcessor
(EINode node, File localdir, String suffix, com.nt.common.util.SMGLock lock) Use this constructor when the accounting files are pushed to a local directory by an outside source. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Parses a line of text (the file header) for the field names.protected void
processTheRecord
(String rawRecord) This call process the record.protected void
setRecordType
(GenericFlatFileRecord ffRecord) This sets up the record type which in turn controls how each of the flat file records are processed.Methods inherited from class com.nt.udc.ndk.node.GenericFlatFileProcessor
initLineTerminators, processFiles, processFilesOrdered, processScratchFile, setRecordType, skipAhead, skipHeader
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
-
record
Override the record as defined in the Generic class.
-
-
Constructor Details
-
FlatFileEIProcessor
public FlatFileEIProcessor(EINode node, File localdir, String suffix, com.nt.common.util.SMGLock lock) throws NodeStartException Use this constructor when the accounting files are pushed to a local directory by an outside source.- Parameters:
node
- The EI node which is using this class.localdir
- The local directory where the target files can be foundsuffix
- 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)- Throws:
NodeStartException
- Used to signal the EI Node that there was a problem getting things going
-
FlatFileEIProcessor
public FlatFileEIProcessor(EINode node, SynchronizedDirectory sd, String suffix, com.nt.common.util.SMGLock lock) throws NodeStartException Use this constructor when using FTP to retrieve the accounting files that need to be processed.- Parameters:
node
- The EI node which is using this class.sd
- The representation of the local directory where the target files can be foundsuffix
- 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)- Throws:
NodeStartException
- Used to signal the EI Node that there was a problem getting things going
-
-
Method Details
-
processTheRecord
Description copied from class:GenericFlatFileProcessor
This call process the record. Classes derived from this type should override this method to use there own record processing class.- Specified by:
processTheRecord
in classGenericFlatFileProcessor
-
setRecordType
This sets up the record type which in turn controls how each of the flat file records are processed. Not all flat file records required delimeters. In those cases the delimeter is ignored. -
getHeader
Parses a line of text (the file header) for the field names.- Overrides:
getHeader
in classGenericFlatFileProcessor
-