org.jclouds.cloudstack.config
Class CloudStackRestClientModule
java.lang.Object
com.google.inject.AbstractModule
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, authException, delegates, syncClientType, URI_SUPPLIER_TYPE |
|
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 |
bindAsyncClient()
|
protected void |
bindClient()
|
protected void |
bindErrorHandlers()
|
protected void |
configure()
|
protected com.google.common.base.Function<org.jclouds.domain.Credentials,LoginResponse> |
makeSureFilterRetriesOnTimeout(LoginWithPasswordCredentials loginWithPasswordCredentials)
|
com.google.common.cache.LoadingCache<org.jclouds.domain.Credentials,LoginResponse> |
provideLoginResponseCache(com.google.common.base.Function<org.jclouds.domain.Credentials,LoginResponse> getLoginResponse,
int seconds)
|
protected com.google.common.base.Supplier<LoginResponse> |
provideLoginResponseSupplier(com.google.common.cache.LoadingCache<org.jclouds.domain.Credentials,LoginResponse> cache,
org.jclouds.domain.Credentials creds)
|
protected com.google.common.base.Supplier<URI> |
providesIntegrationEndpoint(com.google.common.base.Supplier<URI> provider,
int port,
com.google.inject.Provider<javax.ws.rs.core.UriBuilder> uriBuilder)
|
| Methods inherited from class org.jclouds.rest.config.RestClientModule |
bindRetryHandlers, installLocations |
| 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>
bindErrorHandlers
protected void bindErrorHandlers()
- Overrides:
bindErrorHandlers in class org.jclouds.rest.config.RestClientModule<CloudStackClient,CloudStackAsyncClient>
providesIntegrationEndpoint
@Provides
protected com.google.common.base.Supplier<URI> providesIntegrationEndpoint(com.google.common.base.Supplier<URI> provider,
int port,
com.google.inject.Provider<javax.ws.rs.core.UriBuilder> uriBuilder)
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,
org.jclouds.domain.Credentials creds)
Copyright © 2009-2012 jclouds. All Rights Reserved.