org.jclouds.openstack.config
Class OpenStackAuthenticationModule

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

public class OpenStackAuthenticationModule
extends com.google.inject.AbstractModule

Configures the Rackspace authentication service connection, including logging and http transport.

Author:
Adrian Cole

Nested Class Summary
static class OpenStackAuthenticationModule.GetAuthenticationResponse
           
 
Constructor Summary
OpenStackAuthenticationModule()
           
 
Method Summary
protected  void configure()
           
protected  OpenStackAuthAsyncClient.AuthenticationResponse provideAuthenticationResponse(com.google.common.base.Supplier<OpenStackAuthAsyncClient.AuthenticationResponse> supplier)
           
protected  com.google.common.base.Supplier<String> provideAuthenticationTokenCache(com.google.common.base.Supplier<OpenStackAuthAsyncClient.AuthenticationResponse> supplier)
          borrowing concurrency code to ensure that caching takes place properly
protected  com.google.common.base.Supplier<Date> provideCacheBusterDate()
           
 
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

OpenStackAuthenticationModule

public OpenStackAuthenticationModule()
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<OpenStackAuthAsyncClient.AuthenticationResponse> supplier)
                                                                           throws InterruptedException,
                                                                                  ExecutionException,
                                                                                  TimeoutException
borrowing concurrency code to ensure that caching takes place properly

Throws:
InterruptedException
ExecutionException
TimeoutException

provideCacheBusterDate

@Provides
@Singleton
protected com.google.common.base.Supplier<Date> provideCacheBusterDate()

provideAuthenticationResponse

@Provides
@Singleton
protected OpenStackAuthAsyncClient.AuthenticationResponse provideAuthenticationResponse(com.google.common.base.Supplier<OpenStackAuthAsyncClient.AuthenticationResponse> supplier)
                                                                                 throws InterruptedException,
                                                                                        ExecutionException,
                                                                                        TimeoutException
Throws:
InterruptedException
ExecutionException
TimeoutException


Copyright © 2009-2011 jclouds. All Rights Reserved.