Package org.jclouds.s3.config
Class S3HttpApiModule<S extends S3Client>
java.lang.Object
com.google.inject.AbstractModule
org.jclouds.rest.config.RestModule
org.jclouds.rest.config.HttpApiModule<S>
org.jclouds.aws.config.AWSHttpApiModule<S>
org.jclouds.s3.config.S3HttpApiModule<S>
- All Implemented Interfaces:
com.google.inject.Module
- Direct Known Subclasses:
AWSS3HttpApiModule
Configures the S3 connection, including logging and http transport.
-
Field Summary
Fields inherited from class org.jclouds.rest.config.HttpApiModule
api
Fields inherited from class org.jclouds.rest.config.RestModule
authException
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
overrides this to change the default error handlers for the http engine ex.protected void
overrides this to change the default retry handlers for the http engine ex.bucketToRegion
(com.google.common.base.Supplier<Set<String>> regionSupplier, S3Client client) 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) protected void
protected com.google.common.base.Supplier
<String> defaultRegionForBucket
(com.google.common.base.Supplier<String> defaultRegion) protected final String
guiceProvideTimeStamp
(com.google.common.base.Supplier<String> cache) protected final com.google.common.base.Supplier
<Date> guiceProvideTimeStampCacheDate
(long seconds, com.google.common.base.Supplier<String> timestamp, DateService dateService) borrowing concurrency code to ensure that caching takes place properlyprovideBucketToRegion
(com.google.common.base.Supplier<Set<String>> regionSupplier, S3Client client) protected final com.google.common.base.Supplier
<URI> provideBucketURI
(com.google.common.base.Supplier<String> defaultRegion, RegionToEndpointOrProviderIfNull regionToEndpoint) protected final com.google.common.base.Supplier
<String> provideDefaultRegionForBucket
(com.google.common.base.Supplier<String> defaultRegion) protected final RequestAuthorizeSignature
provideRequestAuthorizeSignature
(com.google.inject.Injector i, int version) protected final RequestSigner
protected RequestAuthorizeSignature
providesRequestAuthorizeSignature
(com.google.inject.Injector i, int version) protected String
provideTimeStamp
(com.google.common.base.Supplier<String> cache) protected final com.google.common.base.Supplier
<String> provideTimeStampCache
(long seconds, DateService dateService) borrowing concurrency code to ensure that caching takes place properlyprotected com.google.common.base.Supplier
<Date> provideTimeStampCacheDate
(long seconds, com.google.common.base.Supplier<String> timestamp, DateService dateService) protected Date
provideTimeStampDate
(com.google.common.base.Supplier<Date> cache) Methods inherited from class org.jclouds.aws.config.AWSHttpApiModule
provideRetryableCodes, provideRetryableServerCodes
Methods inherited from class org.jclouds.rest.config.RestModule
installLocations
Methods inherited from class com.google.inject.AbstractModule
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestInjection, requestStaticInjection, requireBinding, requireBinding
-
Constructor Details
-
S3HttpApiModule
public S3HttpApiModule() -
S3HttpApiModule
-
-
Method Details
-
provideBucketToRegion
-
bucketToRegion
-
bucketToRegion
-
provideDefaultRegionForBucket
-
defaultRegionForBucket
-
provideBucketURI
@Provides @Singleton protected final com.google.common.base.Supplier<URI> provideBucketURI(com.google.common.base.Supplier<String> defaultRegion, RegionToEndpointOrProviderIfNull regionToEndpoint) -
configure
protected void configure()- Overrides:
configure
in classHttpApiModule<S extends S3Client>
-
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 classAWSHttpApiModule<S extends S3Client>
-
provideRequestAuthorizeSignature
@Provides @Singleton protected final RequestAuthorizeSignature provideRequestAuthorizeSignature(com.google.inject.Injector i, @Named("jclouds.s3.signer-version") int version) -
providesRequestAuthorizeSignature
protected RequestAuthorizeSignature providesRequestAuthorizeSignature(com.google.inject.Injector i, int version) -
provideRequestSigner
@Provides @Singleton protected final RequestSigner provideRequestSigner(RequestAuthorizeSignature in) -
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 classAWSHttpApiModule<S extends S3Client>
-
guiceProvideTimeStamp
-
provideTimeStamp
-
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
-
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)
-