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
apiFields inherited from class org.jclouds.rest.config.RestModule
authException -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidoverrides this to change the default error handlers for the http engine ex.protected voidoverrides 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 voidprotected com.google.common.base.Supplier<String> defaultRegionForBucket(com.google.common.base.Supplier<String> defaultRegion) protected final StringguiceProvideTimeStamp(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 RequestAuthorizeSignatureprovideRequestAuthorizeSignature(com.google.inject.Injector i, int version) protected final RequestSignerprotected RequestAuthorizeSignatureprovidesRequestAuthorizeSignature(com.google.inject.Injector i, int version) protected StringprovideTimeStamp(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 DateprovideTimeStampDate(com.google.common.base.Supplier<Date> cache) Methods inherited from class org.jclouds.aws.config.AWSHttpApiModule
provideRetryableCodes, provideRetryableServerCodesMethods inherited from class org.jclouds.rest.config.RestModule
installLocationsMethods 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, 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:
configurein classHttpApiModule<S extends S3Client>
-
bindErrorHandlers
protected void bindErrorHandlers()Description copied from class:HttpApiModuleoverrides 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:
bindErrorHandlersin 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:HttpApiModuleoverrides 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:
bindRetryHandlersin 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)
-