org.jclouds.savvis.vpdc.config
Class VPDCRestClientModule

java.lang.Object
  extended by com.google.inject.AbstractModule
      extended by org.jclouds.rest.config.RestClientModule<VPDCClient,VPDCAsyncClient>
          extended by org.jclouds.savvis.vpdc.config.VPDCRestClientModule
All Implemented Interfaces:
com.google.inject.Module

public class VPDCRestClientModule
extends RestClientModule<VPDCClient,VPDCAsyncClient>

Author:
Adrian Cole

Field Summary
protected  AtomicReference<AuthorizationException> authException
           
static Map<Class<?>,Class<?>> DELEGATE_MAP
           
 
Fields inherited from class org.jclouds.rest.config.RestClientModule
asyncClientType, delegates, syncClientType, URI_SUPPLIER_TYPE
 
Constructor Summary
VPDCRestClientModule()
           
 
Method Summary
protected  void bindErrorHandlers()
          overrides this to change the default error handlers for the http engine ex.
protected  void installLocations()
           
protected  String provideDefaultOrgId(Set<Resource> orgs)
           
protected  Set<CIMOperatingSystem> provideOperatingSystems(Json json, String providerName)
           
protected  Set<Resource> provideOrgs(com.google.common.base.Supplier<VCloudSession> cache, String user)
           
protected  com.google.common.base.Supplier<VCloudSession> provideVCloudTokenCache(long seconds, LoginAsyncClient login)
           
protected  LoginAsyncClient provideVCloudVersions(AsyncClientFactory factory)
           
protected  com.google.common.base.Predicate<String> successTester(com.google.inject.Injector injector, long completed)
           
 
Methods inherited from class org.jclouds.rest.config.RestClientModule
bindAsyncClient, bindClient, bindRetryHandlers, configure
 
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
 

Field Detail

authException

protected AtomicReference<AuthorizationException> authException

DELEGATE_MAP

public static final Map<Class<?>,Class<?>> DELEGATE_MAP
Constructor Detail

VPDCRestClientModule

public VPDCRestClientModule()
Method Detail

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.