Class S3ProtocolResolverRegistrar
- java.lang.Object
-
- com.netflix.genie.common.internal.aws.s3.S3ProtocolResolverRegistrar
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
public class S3ProtocolResolverRegistrar extends java.lang.Object implements org.springframework.context.ApplicationContextAwareA class which takes an instance ofS3ProtocolResolverand adds it to the SpringApplicationContextset ofProtocolResolver. This class will also search for any existing instances ofSimpleStorageProtocolResolverwithin the current protocol resolver set. Since the protocol resolvers are iterated in the order they're added, due to being backed byLinkedHashMap, any call toResourceLoader.getResource(String)would always useSimpleStorageProtocolResolverfor S3 resources if it was already in the set before this class is invoked.- Since:
- 4.0.0
-
-
Constructor Summary
Constructors Constructor Description S3ProtocolResolverRegistrar(S3ProtocolResolver s3ProtocolResolver)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)
-
-
-
Constructor Detail
-
S3ProtocolResolverRegistrar
public S3ProtocolResolverRegistrar(S3ProtocolResolver s3ProtocolResolver)
Constructor.- Parameters:
s3ProtocolResolver- the resolver that this class will register with the application context
-
-
Method Detail
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansExceptionAdd the
S3ProtocolResolverto the set of protocol resolvers in the application context. Remove any instances ofSimpleStorageProtocolResolver.- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
-