org.jclouds.savvis.vpdc.config
Class VPDCRestClientModule
java.lang.Object
com.google.inject.AbstractModule
org.jclouds.rest.config.RestClientModule<VPDCClient,VPDCAsyncClient>
org.jclouds.savvis.vpdc.config.VPDCRestClientModule
- All Implemented Interfaces:
- com.google.inject.Module
public class VPDCRestClientModule
- extends RestClientModule<VPDCClient,VPDCAsyncClient>
- 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 |
authException
protected AtomicReference<AuthorizationException> authException
DELEGATE_MAP
public static final Map<Class<?>,Class<?>> DELEGATE_MAP
VPDCRestClientModule
public VPDCRestClientModule()
provideVCloudVersions
@Provides
@Singleton
protected LoginAsyncClient provideVCloudVersions(AsyncClientFactory factory)
provideOrgs
@Provides
@Singleton
protected Set<Resource> provideOrgs(com.google.common.base.Supplier<VCloudSession> cache,
@Named(value="jclouds.identity")
String user)
provideDefaultOrgId
@Provides
@Singleton
protected String provideDefaultOrgId(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,
LoginAsyncClient 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<VPDCClient,VPDCAsyncClient>
installLocations
protected void installLocations()
- Overrides:
installLocations
in class RestClientModule<VPDCClient,VPDCAsyncClient>
Copyright © 2009-2012 jclouds. All Rights Reserved.