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, CloudServersComputeServiceContextModule, ComputeServiceAdapterContextModule, EC2ComputeServiceContextModule, GoGridComputeServiceContextModule, NovaComputeServiceContextModule, RimuHostingComputeServiceContextModule, SlicehostComputeServiceContextModule, TerremarkVCloudComputeServiceContextModule, VCloudComputeServiceContextModule

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

Author:
Adrian Cole

Field Summary
protected  AtomicReference<AuthorizationException> authException
           
 
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)
          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  com.google.common.base.Supplier<Set<? extends Image>> supplyImageCache(long seconds, com.google.common.base.Supplier<Set<? extends Image>> imageSupplier)
           
protected  com.google.common.base.Supplier<Set<? extends Hardware>> supplySizeCache(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
 

Field Detail

authException

protected AtomicReference<AuthorizationException> authException
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)

provideTemplate

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


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(@Named(value="jclouds.session-interval")
                                                                                                    long seconds,
                                                                                                    com.google.common.base.Supplier<Set<? extends Image>> 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(@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-2011 jclouds. All Rights Reserved.