Class PosixAtomicFileDownloader

java.lang.Object
de.dlr.proseo.storagemgr.posix.PosixAtomicFileDownloader
All Implemented Interfaces:
AtomicCommand<String>

public class PosixAtomicFileDownloader extends Object implements AtomicCommand<String>
Posix Atomic File Downloader from the POSIX Storage to some POSIX Path (normally, to the cache)
Author:
Denys Chaykovskiy
  • Constructor Details

    • PosixAtomicFileDownloader

      public PosixAtomicFileDownloader(String sourceFile, String targetFileOrDir)
      Constructor
      Parameters:
      sourceFile - sourceFile
      targetFileOrDir - target file or directory
  • Method Details

    • execute

      public String execute() throws IOException
      Executes download of the file from the storage to posix path
      Specified by:
      execute in interface AtomicCommand<String>
      Returns:
      uploaded file name
      Throws:
      IOException - if atomic command was not successful
    • getInfo

      public String getInfo()
      Gets information about atomic command (mostly for logs)
      Specified by:
      getInfo in interface AtomicCommand<String>
      Returns:
      information about atomic command
    • getCompletedInfo

      public String getCompletedInfo()
      Gets information about completed atomic command (mostly for logs)
      Specified by:
      getCompletedInfo in interface AtomicCommand<String>
      Returns:
      information about completed atomic command
    • getFailedInfo

      public String getFailedInfo()
      Gets information about failed atomic command (mostly for logs)
      Specified by:
      getFailedInfo in interface AtomicCommand<String>
      Returns:
      information about failed atomic command