org.jclouds.savvis.vpdc.config
Class VPDCRestClientModule

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

public class VPDCRestClientModule
extends RestClientModule<VPDCApi,VPDCAsyncApi>

Author:
Adrian Cole

Field Summary
static Map<Class<?>,Class<?>> DELEGATE_MAP
           
 
Fields inherited from class org.jclouds.rest.config.RestClientModule
asyncClientType, syncClientType
 
Fields inherited from class org.jclouds.rest.config.RestModule
authException, sync2Async, 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 configure()
           
protected  void installLocations()
           
protected  com.google.common.base.Supplier<String> provideDefaultOrgId(com.google.common.base.Supplier<Set<Resource>> orgs)
           
protected  Set<CIMOperatingSystem> provideOperatingSystems(Json json, String providerName)
           
protected  com.google.common.base.Supplier<Set<Resource>> provideOrgs(com.google.common.base.Supplier<VCloudSession> cache, String user)
           
protected  com.google.common.base.Supplier<String> provideVCloudToken(com.google.common.base.Supplier<VCloudSession> cache)
           
protected  com.google.common.base.Supplier<VCloudSession> provideVCloudTokenCache(long seconds, LoginApi login)
           
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
 
Methods inherited from class org.jclouds.rest.config.RestModule
seedAnnotationCache, timeouts
 
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

DELEGATE_MAP

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

VPDCRestClientModule

public VPDCRestClientModule()
Method Detail

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.