Class OSARFileMngr

java.lang.Object
com.nt.udc.osanode.OSARFileMngr
All Implemented Interfaces:
ActionListener, EventListener

public class OSARFileMngr extends Object implements ActionListener
  • Field Details

    • FILEMGRINIT

      public static final String FILEMGRINIT
    • OSARREAD

      public static final String OSARREAD
    • OSARWRITE

      public static final String OSARWRITE
    • OSARDELETE

      public static final String OSARDELETE
  • Constructor Details

  • Method Details

    • shutdown

      public void shutdown()
    • getFilenameGenerator

      public final FilenameGenerator getFilenameGenerator()
    • setFilenameGenerator

      public final void setFilenameGenerator(FilenameGenerator filenameGen)
    • readOSARsFromFile

      public OSAR[] readOSARsFromFile(File osarFile)
    • readOSARs

      public OSAR[] readOSARs()
      This method reads all OSARs from the oldest archive file in the node's input directory and returns an OSAR array to the caller. Current functionality allows only for a bulk read of OSARs from archive files in the input directory. Much more file management must be added to allow the reading of single OSARs from the input directory.
    • deleteOSARs

      public boolean deleteOSARs()
      This method deletes the OSAR file in the node's input directory from which the latest batch of OSARs has been processed.
    • writeOSARs

      public boolean writeOSARs(OSAR[] osars)
      This method writes OSARs to the node's output directory.
    • writeOSAR

      public boolean writeOSAR(OSAR osar)
      The writeOSAR() method stores an OSAR in the current cache file. When the cache file reaches the maximum number of OSARs, it is renamed to the node output directory, which makes it available to the LDM and RDM.
    • moveToArchive

      public boolean moveToArchive()
    • checkInput

      public boolean checkInput()
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Specified by:
      actionPerformed in interface ActionListener