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.ApplicationContextAware
A class which takes an instance ofS3ProtocolResolver
and adds it to the SpringApplicationContext
set ofProtocolResolver
. This class will also search for any existing instances ofSimpleStorageProtocolResolver
within 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 useSimpleStorageProtocolResolver
for 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 void
setApplicationContext(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.BeansException
Add the
S3ProtocolResolver
to the set of protocol resolvers in the application context. Remove any instances ofSimpleStorageProtocolResolver
.- Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-
-