org.jclouds.location.config
Class LocationModule

java.lang.Object
  extended by com.google.inject.AbstractModule
      extended by org.jclouds.location.config.LocationModule
All Implemented Interfaces:
com.google.inject.Module
Direct Known Subclasses:
JustProviderLocationModule, RegionsLocationModule

public class LocationModule
extends com.google.inject.AbstractModule

Author:
Adrian Cole

Field Summary
protected  AtomicReference<AuthorizationException> authException
           
 
Constructor Summary
LocationModule()
           
LocationModule(AtomicReference<AuthorizationException> authException)
           
 
Method Summary
protected  void configure()
           
protected  com.google.common.base.Supplier<Map<String,? extends Location>> provideLocationMap(com.google.common.base.Supplier<Set<? extends Location>> locations)
           
protected  com.google.common.base.Supplier<Set<? extends Location>> supplyLocationCache(long seconds, com.google.common.base.Supplier<Set<? extends Location>> locationSupplier)
           
 
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 final AtomicReference<AuthorizationException> authException
Constructor Detail

LocationModule

public LocationModule()

LocationModule

public LocationModule(AtomicReference<AuthorizationException> authException)
Method Detail

provideLocationMap

@Provides
@Singleton
protected com.google.common.base.Supplier<Map<String,? extends Location>> provideLocationMap(com.google.common.base.Supplier<Set<? extends Location>> locations)

supplyLocationCache

@Provides
@Singleton
protected com.google.common.base.Supplier<Set<? extends Location>> supplyLocationCache(@Named(value="jclouds.session-interval")
                                                                                                          long seconds,
                                                                                                          com.google.common.base.Supplier<Set<? extends Location>> locationSupplier)

configure

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


Copyright © 2009-2011 jclouds. All Rights Reserved.