org.jclouds.cloudstack.config
Class CloudStackRestClientModule
java.lang.Object
com.google.inject.AbstractModule
org.jclouds.rest.config.RestModule
org.jclouds.rest.config.RestClientModule<CloudStackClient,CloudStackAsyncClient>
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
| 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 |
| Methods inherited from class org.jclouds.rest.config.RestClientModule |
bindRetryHandlers |
| Methods inherited from class org.jclouds.rest.config.RestModule |
delegationMap, seedAnnotationCache, timeouts |
| 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 |
DELEGATE_MAP
public static final Map<Class<?>,Class<?>> DELEGATE_MAP
CloudStackRestClientModule
public CloudStackRestClientModule()
bindAsyncClient
protected void bindAsyncClient()
- Overrides:
bindAsyncClient in class org.jclouds.rest.config.RestClientModule<CloudStackClient,CloudStackAsyncClient>
bindClient
protected void bindClient()
- Overrides:
bindClient in class org.jclouds.rest.config.RestClientModule<CloudStackClient,CloudStackAsyncClient>
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.
makeSureFilterRetriesOnTimeout
@Provides
protected com.google.common.base.Function<org.jclouds.domain.Credentials,LoginResponse> makeSureFilterRetriesOnTimeout(LoginWithPasswordCredentials loginWithPasswordCredentials)
provideLoginResponseCache
@Provides
public com.google.common.cache.LoadingCache<org.jclouds.domain.Credentials,LoginResponse> provideLoginResponseCache(com.google.common.base.Function<org.jclouds.domain.Credentials,LoginResponse> 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.