Class NAREIFileProcessor

All Implemented Interfaces:
DataProviderIfc, DCTransport, FileDataProviderIfc, Runnable

public class NAREIFileProcessor extends FileEITransport
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 Details

  • 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

      protected void processFiles(Vector filesToProcess)
      Here's where we actually parse the files and extract the data of interest.
      Specified by:
      processFiles in class FileEITransport
      Parameters:
      filesToProcess - List of filenames that need to be processed
    • processFilesOrdered

      protected void processFilesOrdered(File currFile)