org.jclouds.openstack.keystone.v2_0.config
Class KeystoneAuthenticationModule

java.lang.Object
  extended by com.google.inject.AbstractModule
      extended by org.jclouds.openstack.keystone.v2_0.config.KeystoneAuthenticationModule
All Implemented Interfaces:
com.google.inject.Module

public class KeystoneAuthenticationModule
extends com.google.inject.AbstractModule

Author:
Adrian Cole

Nested Class Summary
static class KeystoneAuthenticationModule.ProviderModule
          For global services who have no regions, such as DNS.
static class KeystoneAuthenticationModule.RegionModule
           
static class KeystoneAuthenticationModule.ZoneModule
           
 
Constructor Summary
KeystoneAuthenticationModule()
           
 
Method Summary
protected  com.google.common.base.Function<org.jclouds.domain.Credentials,Access> authenticationMethodForCredentialType(String credentialType, Map<String,com.google.common.base.Function<org.jclouds.domain.Credentials,Access>> authenticationMethods)
           
protected  Map<String,com.google.common.base.Function<org.jclouds.domain.Credentials,Access>> authenticationMethods(com.google.inject.Injector i)
           
protected  void configure()
           
 com.google.common.cache.LoadingCache<org.jclouds.domain.Credentials,Access> provideAccessCache(com.google.common.base.Function<org.jclouds.domain.Credentials,Access> getAccess)
           
protected  com.google.common.base.Supplier<Access> provideAccessSupplier(com.google.common.cache.LoadingCache<org.jclouds.domain.Credentials,Access> cache, com.google.common.base.Supplier<org.jclouds.domain.Credentials> creds)
           
protected  com.google.common.base.Supplier<String> provideAuthenticationTokenCache(com.google.common.base.Supplier<Access> supplier)
          borrowing concurrency code to ensure that caching takes place properly
 
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

KeystoneAuthenticationModule

public KeystoneAuthenticationModule()
Method Detail

configure

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

provideAuthenticationTokenCache

@Provides
@Singleton
protected com.google.common.base.Supplier<String> provideAuthenticationTokenCache(com.google.common.base.Supplier<Access> supplier)
                                                                           throws InterruptedException,
                                                                                  ExecutionException,
                                                                                  TimeoutException
borrowing concurrency code to ensure that caching takes place properly

Throws:
InterruptedException
ExecutionException
TimeoutException

authenticationMethods

@Provides
@Singleton
protected Map<String,com.google.common.base.Function<org.jclouds.domain.Credentials,Access>> authenticationMethods(com.google.inject.Injector i)

authenticationMethodForCredentialType

@Provides
@Singleton
protected com.google.common.base.Function<org.jclouds.domain.Credentials,Access> authenticationMethodForCredentialType(@Named(value="jclouds.keystone.credential-type")
                                                                                                                                          String credentialType,
                                                                                                                                          Map<String,com.google.common.base.Function<org.jclouds.domain.Credentials,Access>> authenticationMethods)

provideAccessCache

@Provides
@Singleton
public com.google.common.cache.LoadingCache<org.jclouds.domain.Credentials,Access> provideAccessCache(com.google.common.base.Function<org.jclouds.domain.Credentials,Access> getAccess)

provideAccessSupplier

@Provides
@Singleton
protected com.google.common.base.Supplier<Access> provideAccessSupplier(com.google.common.cache.LoadingCache<org.jclouds.domain.Credentials,Access> cache,
                                                                                           com.google.common.base.Supplier<org.jclouds.domain.Credentials> creds)


Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.