org.jclouds.compute.config
Class BaseComputeServiceContextModule

java.lang.Object
  extended by com.google.inject.AbstractModule
      extended by org.jclouds.compute.config.BaseComputeServiceContextModule
All Implemented Interfaces:
com.google.inject.Module
Direct Known Subclasses:
AWSEC2ComputeServiceContextModule, ComputeServiceAdapterContextModule, EC2ComputeServiceContextModule, RimuHostingComputeServiceContextModule, TerremarkVCloudComputeServiceContextModule

public abstract class BaseComputeServiceContextModule
extends com.google.inject.AbstractModule

Author:
Adrian Cole

Constructor Summary
BaseComputeServiceContextModule()
           
 
Method Summary
protected  void configure()
           
protected  com.google.common.base.Function<ComputeMetadata,String> indexer()
           
protected  com.google.common.base.Supplier<Map<String,? extends Image>> provideImageMap(com.google.common.base.Supplier<Set<? extends Image>> images)
           
protected  String provideNamingConvention()
          supplies how the tag is encoded into the name.
 Map<OsFamily,Map<String,String>> provideOsVersionMap(ComputeServiceConstants.ReferenceData data, Json json)
           
protected  com.google.common.base.Supplier<Map<String,? extends Hardware>> provideSizeMap(com.google.common.base.Supplier<Set<? extends Hardware>> sizes)
           
protected  TemplateBuilder provideTemplate(com.google.inject.Injector injector, TemplateBuilder template)
           
protected  TemplateBuilder provideTemplateOptionallyFromProperties(com.google.inject.Injector injector, TemplateBuilder template, String provider, ValueOfConfigurationKeyOrNull config)
          The default template if none is provided.
protected  TemplateOptions provideTemplateOptions(com.google.inject.Injector injector, TemplateOptions options)
          The default options if none are provided.
protected  boolean shouldParseImagesOnDemand(com.google.inject.Injector injector)
           
protected  com.google.common.base.Supplier<Set<? extends Image>> supplyImageCache(AtomicReference<AuthorizationException> authException, long seconds, com.google.common.base.Supplier<Set<? extends Image>> imageSupplier)
           
protected  com.google.common.base.Supplier<Set<? extends Image>> supplyImageCache(AtomicReference<AuthorizationException> authException, long seconds, com.google.common.base.Supplier<Set<? extends Image>> imageSupplier, com.google.inject.Injector injector)
           
protected  com.google.common.base.Supplier<Set<? extends Image>> supplyNonParsingImageCache(AtomicReference<AuthorizationException> authException, long seconds, com.google.common.base.Supplier<Set<? extends Image>> imageSupplier, com.google.inject.Injector injector)
          For overriding; default impl is same as supplyImageCache(seconds, imageSupplier)
protected  com.google.common.base.Supplier<Set<? extends Hardware>> supplySizeCache(AtomicReference<AuthorizationException> authException, long seconds, com.google.common.base.Supplier<Set<? extends Hardware>> hardwareSupplier)
           
 
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

BaseComputeServiceContextModule

public BaseComputeServiceContextModule()
Method Detail

configure

protected void configure()
Specified by:
configure in class com.google.inject.AbstractModule

provideOsVersionMap

@Provides
@Singleton
public Map<OsFamily,Map<String,String>> provideOsVersionMap(ComputeServiceConstants.ReferenceData data,
                                                                               Json json)

provideTemplateOptionallyFromProperties

@Provides
@Named(value="DEFAULT")
protected TemplateBuilder provideTemplateOptionallyFromProperties(com.google.inject.Injector injector,
                                                                                 TemplateBuilder template,
                                                                                 String provider,
                                                                                 ValueOfConfigurationKeyOrNull config)
The default template if none is provided.


provideTemplate

protected TemplateBuilder provideTemplate(com.google.inject.Injector injector,
                                          TemplateBuilder template)

provideTemplateOptions

@Provides
@Named(value="DEFAULT")
protected TemplateOptions provideTemplateOptions(com.google.inject.Injector injector,
                                                                TemplateOptions options)
The default options if none are provided.


provideNamingConvention

@Provides
@Named(value="NAMING_CONVENTION")
@Singleton
protected String provideNamingConvention()
supplies how the tag is encoded into the name. A string of hex characters is the last argument and tag is the first


provideImageMap

@Provides
@Singleton
protected com.google.common.base.Supplier<Map<String,? extends Image>> provideImageMap(com.google.common.base.Supplier<Set<? extends Image>> images)

supplyImageCache

@Provides
@Singleton
protected com.google.common.base.Supplier<Set<? extends Image>> supplyImageCache(AtomicReference<AuthorizationException> authException,
                                                                                                    @Named(value="jclouds.session-interval")
                                                                                                    long seconds,
                                                                                                    com.google.common.base.Supplier<Set<? extends Image>> imageSupplier,
                                                                                                    com.google.inject.Injector injector)

shouldParseImagesOnDemand

protected boolean shouldParseImagesOnDemand(com.google.inject.Injector injector)

supplyImageCache

protected com.google.common.base.Supplier<Set<? extends Image>> supplyImageCache(AtomicReference<AuthorizationException> authException,
                                                                                 @Named(value="jclouds.session-interval")
                                                                                 long seconds,
                                                                                 com.google.common.base.Supplier<Set<? extends Image>> imageSupplier)

supplyNonParsingImageCache

protected com.google.common.base.Supplier<Set<? extends Image>> supplyNonParsingImageCache(AtomicReference<AuthorizationException> authException,
                                                                                           @Named(value="jclouds.session-interval")
                                                                                           long seconds,
                                                                                           com.google.common.base.Supplier<Set<? extends Image>> imageSupplier,
                                                                                           com.google.inject.Injector injector)
For overriding; default impl is same as supplyImageCache(seconds, imageSupplier)


provideSizeMap

@Provides
@Singleton
protected com.google.common.base.Supplier<Map<String,? extends Hardware>> provideSizeMap(com.google.common.base.Supplier<Set<? extends Hardware>> sizes)

supplySizeCache

@Provides
@Singleton
protected com.google.common.base.Supplier<Set<? extends Hardware>> supplySizeCache(AtomicReference<AuthorizationException> authException,
                                                                                                      @Named(value="jclouds.session-interval")
                                                                                                      long seconds,
                                                                                                      com.google.common.base.Supplier<Set<? extends Hardware>> hardwareSupplier)

indexer

@Provides
@Singleton
protected com.google.common.base.Function<ComputeMetadata,String> indexer()


Copyright © 2009-2012 jclouds. All Rights Reserved.