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 Object implements org.springframework.context.ApplicationContextAware
A class which takes an instance of S3ProtocolResolver and adds it to the Spring ApplicationContext set of ProtocolResolver. This class will also search for any existing instances of S3ProtocolResolver within the current protocol resolver set. Since the protocol resolvers are iterated in the order they're added, due to being backed by LinkedHashMap, any call to ResourceLoader.getResource(String) would always use S3ProtocolResolver for S3 resources if it was already in the set before this class is invoked.
Since:
4.0.0
  • Constructor Details

    • S3ProtocolResolverRegistrar

      public S3ProtocolResolverRegistrar(S3ProtocolResolver s3ProtocolResolver)
      Constructor.
      Parameters:
      s3ProtocolResolver - the resolver that this class will register with the application context
  • Method Details

    • 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 of ProtocolResolver.

      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException