org.jclouds.trmk.vcloud_0_8.config
Class TerremarkVCloudRestClientModule<S extends TerremarkVCloudClient,A extends TerremarkVCloudAsyncClient>

java.lang.Object
  extended by com.google.inject.AbstractModule
      extended by org.jclouds.rest.config.RestClientModule<S,A>
          extended by org.jclouds.trmk.vcloud_0_8.config.TerremarkVCloudRestClientModule<S,A>
All Implemented Interfaces:
com.google.inject.Module
Direct Known Subclasses:
TerremarkECloudRestClientModule, TerremarkVCloudExpressRestClientModule

public class TerremarkVCloudRestClientModule<S extends TerremarkVCloudClient,A extends TerremarkVCloudAsyncClient>
extends RestClientModule<S,A>


Nested Class Summary
static class TerremarkVCloudRestClientModule.OrgCatalogItemSupplier
           
static class TerremarkVCloudRestClientModule.OrgCatalogSupplier
           
static class TerremarkVCloudRestClientModule.OrgMapSupplier
           
static class TerremarkVCloudRestClientModule.OrgNameToKeysListSupplier
           
static class TerremarkVCloudRestClientModule.OrgVDCSupplier
           
static class TerremarkVCloudRestClientModule.URItoVDC
           
 
Field Summary
 
Fields inherited from class org.jclouds.rest.config.RestClientModule
asyncClientType, authException, delegates, syncClientType, URI_SUPPLIER_TYPE
 
Constructor Summary
TerremarkVCloudRestClientModule(Class<S> syncClientType, Class<A> asyncClientType)
           
TerremarkVCloudRestClientModule(Class<S> syncClientType, Class<A> asyncClientType, Map<Class<?>,Class<?>> delegateMap)
           
 
Method Summary
protected  void bindErrorHandlers()
          overrides this to change the default error handlers for the http engine ex.
protected  void configure()
           
protected  void installDefaultVCloudEndpointsModule()
           
protected  void installLocations()
           
protected  com.google.common.base.Supplier<URI> provideAuthenticationURI(TerremarkVCloudVersionsClient versionService, String version)
           
protected  Org provideOrg(com.google.common.base.Supplier<Map<String,? extends Org>> orgSupplier, ReferenceType defaultOrg)
           
protected  com.google.common.base.Supplier<Map<String,Map<String,? extends Catalog>>> provideOrgCatalogItemMapSupplierCache(long seconds, AtomicReference<AuthorizationException> authException, TerremarkVCloudRestClientModule.OrgCatalogSupplier supplier)
           
protected  com.google.common.base.Supplier<Map<String,Map<String,Map<String,? extends CatalogItem>>>> provideOrgCatalogItemSupplierCache(long seconds, AtomicReference<AuthorizationException> authException, TerremarkVCloudRestClientModule.OrgCatalogItemSupplier supplier)
           
protected  com.google.common.base.Supplier<URI> provideOrgListURI(com.google.common.base.Supplier<VCloudSession> sessionSupplier)
           
protected  com.google.common.base.Supplier<Map<String,? extends Org>> provideOrgMapCache(long seconds, AtomicReference<AuthorizationException> authException, TerremarkVCloudRestClientModule.OrgMapSupplier supplier)
           
protected  com.google.common.base.Supplier<Map<String,ReferenceType>> provideOrgToKeysListCache(long seconds, AtomicReference<AuthorizationException> authException, TerremarkVCloudRestClientModule.OrgNameToKeysListSupplier supplier)
           
protected  com.google.common.base.Supplier<Map<String,Map<String,? extends VDC>>> provideOrgVDCSupplierCache(long seconds, AtomicReference<AuthorizationException> authException, TerremarkVCloudRestClientModule.OrgVDCSupplier supplier)
           
protected  com.google.common.base.Supplier<Map<URI,? extends VDC>> provideURIToVDC(long seconds, AtomicReference<AuthorizationException> authException, TerremarkVCloudRestClientModule.URItoVDC supplier)
           
protected  com.google.common.base.Supplier<VCloudSession> provideVCloudTokenCache(long seconds, AtomicReference<AuthorizationException> authException, TerremarkVCloudLoginClient login)
           
protected  com.google.common.base.Supplier<Map<String,ReferenceType>> provideVDCtoORG(long seconds, AtomicReference<AuthorizationException> authException, org.jclouds.trmk.vcloud_0_8.config.TerremarkVCloudRestClientModule.OrgNameToOrgSupplier supplier)
           
protected  com.google.common.base.Supplier<Map<String,String>> provideVDCtoORG(com.google.common.base.Supplier<Map<String,? extends Org>> orgNameToOrgSuppier)
           
protected  com.google.common.base.Predicate<URI> successTester(com.google.inject.Injector injector, long completed)
           
 
Methods inherited from class org.jclouds.rest.config.RestClientModule
bindAsyncClient, bindClient, bindRetryHandlers
 
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
 

Constructor Detail

TerremarkVCloudRestClientModule

public TerremarkVCloudRestClientModule(Class<S> syncClientType,
                                       Class<A> asyncClientType)

TerremarkVCloudRestClientModule

public TerremarkVCloudRestClientModule(Class<S> syncClientType,
                                       Class<A> asyncClientType,
                                       Map<Class<?>,Class<?>> delegateMap)
Method Detail

configure

protected void configure()
Overrides:
configure in class RestClientModule<S extends TerremarkVCloudClient,A extends TerremarkVCloudAsyncClient>

provideVDCtoORG

@Provides
@Singleton
protected com.google.common.base.Supplier<Map<String,String>> provideVDCtoORG(com.google.common.base.Supplier<Map<String,? extends Org>> orgNameToOrgSuppier)

provideOrgMapCache

@Provides
@Singleton
protected com.google.common.base.Supplier<Map<String,? extends Org>> provideOrgMapCache(@Named(value="jclouds.session-interval")
                                                                                                           long seconds,
                                                                                                           AtomicReference<AuthorizationException> authException,
                                                                                                           TerremarkVCloudRestClientModule.OrgMapSupplier supplier)

provideOrgListURI

@Provides
@Singleton
protected com.google.common.base.Supplier<URI> provideOrgListURI(com.google.common.base.Supplier<VCloudSession> sessionSupplier)

installDefaultVCloudEndpointsModule

protected void installDefaultVCloudEndpointsModule()

provideVDCtoORG

@Provides
@Singleton
protected com.google.common.base.Supplier<Map<String,ReferenceType>> provideVDCtoORG(@Named(value="jclouds.session-interval")
                                                                                                        long seconds,
                                                                                                        AtomicReference<AuthorizationException> authException,
                                                                                                        org.jclouds.trmk.vcloud_0_8.config.TerremarkVCloudRestClientModule.OrgNameToOrgSupplier supplier)

provideURIToVDC

@Provides
@Singleton
protected com.google.common.base.Supplier<Map<URI,? extends VDC>> provideURIToVDC(@Named(value="jclouds.session-interval")
                                                                                                     long seconds,
                                                                                                     AtomicReference<AuthorizationException> authException,
                                                                                                     TerremarkVCloudRestClientModule.URItoVDC supplier)

provideAuthenticationURI

@Provides
@Singleton
protected com.google.common.base.Supplier<URI> provideAuthenticationURI(TerremarkVCloudVersionsClient versionService,
                                                                                           @Named(value="jclouds.api-version")
                                                                                           String version)

provideOrg

@Provides
@Singleton
protected Org provideOrg(com.google.common.base.Supplier<Map<String,? extends Org>> orgSupplier,
                                            ReferenceType defaultOrg)

successTester

@Provides
@Singleton
protected com.google.common.base.Predicate<URI> successTester(com.google.inject.Injector injector,
                                                                                 @Named(value="jclouds.vcloud.timeout.task-complete")
                                                                                 long completed)

provideOrgCatalogItemMapSupplierCache

@Provides
@Singleton
protected com.google.common.base.Supplier<Map<String,Map<String,? extends Catalog>>> provideOrgCatalogItemMapSupplierCache(@Named(value="jclouds.session-interval")
                                                                                                                                              long seconds,
                                                                                                                                              AtomicReference<AuthorizationException> authException,
                                                                                                                                              TerremarkVCloudRestClientModule.OrgCatalogSupplier supplier)

provideOrgVDCSupplierCache

@Provides
@Singleton
protected com.google.common.base.Supplier<Map<String,Map<String,? extends VDC>>> provideOrgVDCSupplierCache(@Named(value="jclouds.session-interval")
                                                                                                                               long seconds,
                                                                                                                               AtomicReference<AuthorizationException> authException,
                                                                                                                               TerremarkVCloudRestClientModule.OrgVDCSupplier supplier)

provideOrgCatalogItemSupplierCache

@Provides
@Singleton
protected com.google.common.base.Supplier<Map<String,Map<String,Map<String,? extends CatalogItem>>>> provideOrgCatalogItemSupplierCache(@Named(value="jclouds.session-interval")
                                                                                                                                                           long seconds,
                                                                                                                                                           AtomicReference<AuthorizationException> authException,
                                                                                                                                                           TerremarkVCloudRestClientModule.OrgCatalogItemSupplier supplier)

provideVCloudTokenCache

@Provides
@Singleton
protected com.google.common.base.Supplier<VCloudSession> provideVCloudTokenCache(@Named(value="jclouds.session-interval")
                                                                                                    long seconds,
                                                                                                    AtomicReference<AuthorizationException> authException,
                                                                                                    TerremarkVCloudLoginClient 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<S extends TerremarkVCloudClient,A extends TerremarkVCloudAsyncClient>

provideOrgToKeysListCache

@Provides
@Singleton
protected com.google.common.base.Supplier<Map<String,ReferenceType>> provideOrgToKeysListCache(@Named(value="jclouds.session-interval")
                                                                                                                  long seconds,
                                                                                                                  AtomicReference<AuthorizationException> authException,
                                                                                                                  TerremarkVCloudRestClientModule.OrgNameToKeysListSupplier supplier)

installLocations

protected void installLocations()
Overrides:
installLocations in class RestClientModule<S extends TerremarkVCloudClient,A extends TerremarkVCloudAsyncClient>


Copyright © 2009-2012 jclouds. All Rights Reserved.