Package de.dlr.proseo.storagemgr.s3
Class S3AtomicInputStreamGetter
java.lang.Object
de.dlr.proseo.storagemgr.s3.S3AtomicInputStreamGetter
- All Implemented Interfaces:
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.
- Author:
- Denys Chaykovskiy
-
Constructor Summary
ConstructorsConstructorDescriptionS3AtomicInputStreamGetter(software.amazon.awssdk.services.s3.S3Client s3Client, String bucket, String relativePath) Constructor -
Method Summary
-
Constructor Details
-
Method Details
-
execute
Executes the input stream getter command and returns the input stream of the S3 file.- Specified by:
executein interfaceAtomicCommand<InputStream>- Returns:
- InputStream of the S3 file
- Throws:
IOException- if an I/O error occurs during the execution
-
getInfo
Gets information about the atomic command.- Specified by:
getInfoin interfaceAtomicCommand<InputStream>- Returns:
- information about the atomic command
-
getCompletedInfo
Gets information about the completed atomic command.- Specified by:
getCompletedInfoin interfaceAtomicCommand<InputStream>- Returns:
- information about the completed atomic command
-
getFailedInfo
Gets information about the failed atomic command.- Specified by:
getFailedInfoin interfaceAtomicCommand<InputStream>- Returns:
- information about the failed atomic command
-