org.jclouds.savvis.vpdc.config
Class VPDCRestClientModule
java.lang.Object
com.google.inject.AbstractModule
org.jclouds.rest.config.RestModule
org.jclouds.rest.config.RestClientModule<VPDCApi,VPDCAsyncApi>
org.jclouds.savvis.vpdc.config.VPDCRestClientModule
- All Implemented Interfaces:
- com.google.inject.Module
public class VPDCRestClientModule
- extends RestClientModule<VPDCApi,VPDCAsyncApi>
- Author:
- Adrian Cole
| Methods inherited from class com.google.inject.AbstractModule |
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DELEGATE_MAP
public static final Map<Class<?>,Class<?>> DELEGATE_MAP
VPDCRestClientModule
public VPDCRestClientModule()
configure
protected void configure()
- Overrides:
configure in class RestClientModule<VPDCApi,VPDCAsyncApi>
provideVCloudToken
@Provides
@Singleton
protected com.google.common.base.Supplier<String> provideVCloudToken(com.google.common.base.Supplier<VCloudSession> cache)
provideOrgs
@Provides
@Singleton
protected com.google.common.base.Supplier<Set<Resource>> provideOrgs(com.google.common.base.Supplier<VCloudSession> cache,
String user)
provideDefaultOrgId
@Provides
@Singleton
protected com.google.common.base.Supplier<String> provideDefaultOrgId(com.google.common.base.Supplier<Set<Resource>> orgs)
successTester
@Provides
@Singleton
protected com.google.common.base.Predicate<String> successTester(com.google.inject.Injector injector,
@Named(value="jclouds.vpdc.timeout.task-complete")
long completed)
provideOperatingSystems
@Singleton
@Provides
protected Set<CIMOperatingSystem> provideOperatingSystems(Json json,
String providerName)
throws IOException
- Throws:
IOException
provideVCloudTokenCache
@Provides
@Singleton
protected com.google.common.base.Supplier<VCloudSession> provideVCloudTokenCache(@Named(value="jclouds.session-interval")
long seconds,
LoginApi login)
bindErrorHandlers
protected void bindErrorHandlers()
- Description copied from class:
RestClientModule
- 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 RestClientModule<VPDCApi,VPDCAsyncApi>
installLocations
protected void installLocations()
- Overrides:
installLocations in class RestModule
Copyright © 2009-2012 jclouds. All Rights Reserved.