Klasse S3AtomicInputStreamGetter

java.lang.Object
de.dlr.proseo.storagemgr.s3.S3AtomicInputStreamGetter
Alle implementierten Schnittstellen:
AtomicCommand<InputStream>

public class S3AtomicInputStreamGetter extends Object implements AtomicCommand<InputStream>
This class implements the AtomicCommand interface to get an input stream of an S3 file. It uses the S3Client from the AWS SDK to retrieve the input stream from the specified bucket and file key. The class also provides information about the execution of the atomic command.
Autor:
Denys Chaykovskiy
  • Konstruktordetails

    • S3AtomicInputStreamGetter

      public S3AtomicInputStreamGetter(software.amazon.awssdk.services.s3.S3Client s3Client, String bucket, String relativePath)
      Constructor
      Parameter:
      s3Client - S3 client
      bucket - Bucket
      relativePath - Relative path of the source file
  • Methodendetails

    • execute

      public InputStream execute() throws IOException
      Executes the input stream getter command and returns the input stream of the S3 file.
      Angegeben von:
      execute in Schnittstelle AtomicCommand<InputStream>
      Gibt zurück:
      InputStream of the S3 file
      Löst aus:
      IOException - if an I/O error occurs during the execution
    • getInfo

      public String getInfo()
      Gets information about the atomic command.
      Angegeben von:
      getInfo in Schnittstelle AtomicCommand<InputStream>
      Gibt zurück:
      information about the atomic command
    • getCompletedInfo

      public String getCompletedInfo()
      Gets information about the completed atomic command.
      Angegeben von:
      getCompletedInfo in Schnittstelle AtomicCommand<InputStream>
      Gibt zurück:
      information about the completed atomic command
    • getFailedInfo

      public String getFailedInfo()
      Gets information about the failed atomic command.
      Angegeben von:
      getFailedInfo in Schnittstelle AtomicCommand<InputStream>
      Gibt zurück:
      information about the failed atomic command