org.jclouds.cloudstack.config
Class CloudStackRestClientModule

java.lang.Object
  extended by com.google.inject.AbstractModule
      extended by org.jclouds.rest.config.RestModule
          extended by org.jclouds.rest.config.RestClientModule<CloudStackClient,CloudStackAsyncClient>
              extended by org.jclouds.cloudstack.config.CloudStackRestClientModule
All Implemented Interfaces:
com.google.inject.Module

public class CloudStackRestClientModule
extends org.jclouds.rest.config.RestClientModule<CloudStackClient,CloudStackAsyncClient>

Configures the cloudstack connection.

Author:
Adrian Cole

Field Summary
static Map<Class<?>,Class<?>> DELEGATE_MAP
           
 
Fields inherited from class org.jclouds.rest.config.RestClientModule
asyncClientType, syncClientType
 
Fields inherited from class org.jclouds.rest.config.RestModule
authException, sync2Async, URI_SUPPLIER_TYPE
 
Constructor Summary
CloudStackRestClientModule()
           
 
Method Summary
protected  AuthenticationFilter authenticationFilterForCredentialType(CredentialType credentialType, AddSessionKeyAndJSessionIdToRequest addSessionKeyAndJSessionIdToRequest, QuerySigner querySigner)
          we use the type of credentials specified at login to determine which way we want to filter the request.
protected  void bindErrorHandlers()
           
protected  void configure()
           
protected  void installLocations()
           
protected  com.google.common.cache.LoadingCache<org.jclouds.domain.Credentials,LoginResponse> provideLoginResponseCache(LoginWithPasswordCredentials getLoginResponse, int seconds)
           
protected  com.google.common.base.Supplier<LoginResponse> provideLoginResponseSupplier(com.google.common.cache.LoadingCache<org.jclouds.domain.Credentials,LoginResponse> cache, com.google.common.base.Supplier<org.jclouds.domain.Credentials> creds)
           
 
Methods inherited from class org.jclouds.rest.config.RestClientModule
bindRetryHandlers
 
Methods inherited from class org.jclouds.rest.config.RestModule
putInvokables, seedKnownSync2AsyncInvokables, sync2async
 
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

DELEGATE_MAP

public static final Map<Class<?>,Class<?>> DELEGATE_MAP
Constructor Detail

CloudStackRestClientModule

public CloudStackRestClientModule()
Method Detail

configure

protected void configure()
Overrides:
configure in class org.jclouds.rest.config.RestClientModule<CloudStackClient,CloudStackAsyncClient>

installLocations

protected void installLocations()
Overrides:
installLocations in class org.jclouds.rest.config.RestModule

bindErrorHandlers

protected void bindErrorHandlers()
Overrides:
bindErrorHandlers in class org.jclouds.rest.config.RestClientModule<CloudStackClient,CloudStackAsyncClient>

authenticationFilterForCredentialType

@Provides
protected AuthenticationFilter authenticationFilterForCredentialType(CredentialType credentialType,
                                                                              AddSessionKeyAndJSessionIdToRequest addSessionKeyAndJSessionIdToRequest,
                                                                              QuerySigner querySigner)
we use the type of credentials specified at login to determine which way we want to filter the request.
for ex, if we are getting passwords, we know we will need to login/logout. Otherwise we are signing requests.


provideLoginResponseCache

@Provides
protected com.google.common.cache.LoadingCache<org.jclouds.domain.Credentials,LoginResponse> provideLoginResponseCache(LoginWithPasswordCredentials getLoginResponse,
                                                                                                                                int seconds)

provideLoginResponseSupplier

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


Copyright © 2009-2013 jclouds. All Rights Reserved.