Class S3HttpApiModule<S extends S3Client>

  • All Implemented Interfaces:
    com.google.inject.Module
    Direct Known Subclasses:
    AWSS3HttpApiModule

    public class S3HttpApiModule<S extends S3Client>
    extends AWSHttpApiModule<S>
    Configures the S3 connection, including logging and http transport.
    • Constructor Detail

      • S3HttpApiModule

        public S3HttpApiModule()
      • S3HttpApiModule

        protected S3HttpApiModule​(Class<S> syncClientType)
    • Method Detail

      • provideBucketToRegion

        @Provides
        @Singleton
        protected final com.google.common.cache.CacheLoader<String,​com.google.common.base.Optional<String>> provideBucketToRegion​(com.google.common.base.Supplier<Set<String>> regionSupplier,
                                                                                                                                        S3Client client)
      • bucketToRegion

        protected com.google.common.cache.CacheLoader<String,​com.google.common.base.Optional<String>> bucketToRegion​(com.google.common.base.Supplier<Set<String>> regionSupplier,
                                                                                                                           S3Client client)
      • bucketToRegion

        @Provides
        @Singleton
        protected final com.google.common.cache.LoadingCache<String,​com.google.common.base.Optional<String>> bucketToRegion​(com.google.common.cache.CacheLoader<String,​com.google.common.base.Optional<String>> loader)
      • provideDefaultRegionForBucket

        @Provides
        @Singleton
        protected final com.google.common.base.Supplier<String> provideDefaultRegionForBucket​(com.google.common.base.Supplier<String> defaultRegion)
      • defaultRegionForBucket

        protected com.google.common.base.Supplier<String> defaultRegionForBucket​(com.google.common.base.Supplier<String> defaultRegion)
      • provideBucketURI

        @Provides
        @Singleton
        protected final com.google.common.base.Supplier<URI> provideBucketURI​(com.google.common.base.Supplier<String> defaultRegion,
                                                                              RegionToEndpointOrProviderIfNull regionToEndpoint)
      • bindErrorHandlers

        protected void bindErrorHandlers()
        Description copied from class: HttpApiModule
        overrides this to change the default error handlers for the http engine ex.
         bind(HttpErrorHandler.class).annotatedWith(Redirection.class).to(ParseAWSErrorFromXmlContent.class);
         bind(HttpErrorHandler.class).annotatedWith(ClientError.class).to(ParseAWSErrorFromXmlContent.class);
         bind(HttpErrorHandler.class).annotatedWith(ServerError.class).to(ParseAWSErrorFromXmlContent.class);
         
        Overrides:
        bindErrorHandlers in class AWSHttpApiModule<S extends S3Client>
      • bindRequestSigner

        protected void bindRequestSigner()
      • bindRetryHandlers

        protected void bindRetryHandlers()
        Description copied from class: HttpApiModule
        overrides this to change the default retry handlers for the http engine ex.
         bind(HttpRetryHandler.class).annotatedWith(Redirection.class).to(AWSRedirectionRetryHandler.class);
         bind(HttpRetryHandler.class).annotatedWith(ClientError.class).to(AWSClientErrorRetryHandler.class);
         
        Overrides:
        bindRetryHandlers in class AWSHttpApiModule<S extends S3Client>
      • guiceProvideTimeStamp

        @Provides
        protected final String guiceProvideTimeStamp​(com.google.common.base.Supplier<String> cache)
      • provideTimeStamp

        protected String provideTimeStamp​(com.google.common.base.Supplier<String> cache)
      • provideTimeStampCache

        @Provides
        @Singleton
        protected final com.google.common.base.Supplier<String> provideTimeStampCache​(@Named("jclouds.session-interval")
                                                                                      long seconds,
                                                                                      DateService dateService)
        borrowing concurrency code to ensure that caching takes place properly
      • provideTimeStampDate

        @Provides
        protected Date provideTimeStampDate​(com.google.common.base.Supplier<Date> cache)
      • guiceProvideTimeStampCacheDate

        @Provides
        @Singleton
        protected final com.google.common.base.Supplier<Date> guiceProvideTimeStampCacheDate​(@Named("jclouds.session-interval")
                                                                                             long seconds,
                                                                                             com.google.common.base.Supplier<String> timestamp,
                                                                                             DateService dateService)
        borrowing concurrency code to ensure that caching takes place properly
      • provideTimeStampCacheDate

        protected com.google.common.base.Supplier<Date> provideTimeStampCacheDate​(@Named("jclouds.session-interval")
                                                                                  long seconds,
                                                                                  com.google.common.base.Supplier<String> timestamp,
                                                                                  DateService dateService)