Class S3ProtocolResolver
java.lang.Object
com.netflix.genie.common.internal.aws.s3.S3ProtocolResolver
- All Implemented Interfaces:
org.springframework.core.io.ProtocolResolver
public class S3ProtocolResolver
extends Object
implements org.springframework.core.io.ProtocolResolver
This class implements the
ProtocolResolver
interface. When an instance of this class is added to a
Spring Application context list of Protocol Resolvers via
ConfigurableApplicationContext.addProtocolResolver(ProtocolResolver)
allows
valid S3 resources to be loaded using the Spring ResourceLoader
abstraction.
Leverages some work done by Spring Cloud AWS.
- Since:
- 4.0.0
-
Constructor Summary
ConstructorDescriptionS3ProtocolResolver
(S3ClientFactory s3ClientFactory, org.springframework.core.task.TaskExecutor s3TaskExecutor) Constructor. -
Method Summary
-
Constructor Details
-
S3ProtocolResolver
public S3ProtocolResolver(S3ClientFactory s3ClientFactory, org.springframework.core.task.TaskExecutor s3TaskExecutor) Constructor.- Parameters:
s3ClientFactory
- The S3 client factory to use to get S3 client instancess3TaskExecutor
- A task executor to use for uploading files to S3
-
-
Method Details
-
resolve
public org.springframework.core.io.Resource resolve(String location, org.springframework.core.io.ResourceLoader resourceLoader) - Specified by:
resolve
in interfaceorg.springframework.core.io.ProtocolResolver
-