Class KnownFieldLengthFileProcessor

All Implemented Interfaces:
DataProviderIfc, DCTransport, FileDataProviderIfc, Runnable

public class KnownFieldLengthFileProcessor extends GenericFlatFileProcessor
This node should be extend if a knew node is required for processing flat files with fields that have a known length and no delimiter.
Since:
JDK1.3.1
  • Constructor Details

    • KnownFieldLengthFileProcessor

      public KnownFieldLengthFileProcessor(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 to be processed (null indicates all files in directory are to be processed).
      lock - Used to properly shutdown the EI and all its threads.
      Throws:
      NodeStartException - Used to signal the EI Node that there was a problem starting the transport.
    • KnownFieldLengthFileProcessor

      public KnownFieldLengthFileProcessor(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 input files can be found.
      suffix - The file suffix used to identify the files to be processed (null indicates all files in directory are to be processed).
      lock - Used to properly shutdown the EI and all its threads.
      Throws:
      NodeStartException - Used to signal the EI Node that there was a problem starting the transport.
  • Method Details

    • setRecordType

      protected void setRecordType()
      This sets up the record type which in turn controls how each of the flat file records are processed. In the case of the KnownFieldLengthFileProcessor, records are parsed based on an externally defined field width that is configured using a specification file. The file is processed using the KnownFiledLengthConfig class.
    • processTheRecord

      protected void processTheRecord(String rawRecord)
      This processes the raw undelimited record based on the known field length specified in the configuration file.
      Specified by:
      processTheRecord in class GenericFlatFileProcessor