org.jclouds.rest
Class RestContextBuilder<S,A>
java.lang.Object
org.jclouds.rest.RestContextBuilder<S,A>
- Direct Known Subclasses:
- AzureStorageContextBuilder, BlobStoreContextBuilder, CloudWatchContextBuilder, ComputeServiceContextBuilder, LoadBalancerServiceContextBuilder
public class RestContextBuilder<S,A>
- extends Object
Creates RestContext
or Injector
instances based on the most commonly requested
arguments.
Note that Threadsafe objects will be bound as singletons to the Injector or Context provided.
If no Module
s are specified, the default logging
and
http transports
will be installed.
- Author:
- Adrian Cole, Andrew Newdigate
- See Also:
RestContext
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
properties
protected Properties properties
modules
protected List<com.google.inject.Module> modules
asyncClientType
protected Class<A> asyncClientType
syncClientType
protected Class<S> syncClientType
RestContextBuilder
@Inject
public RestContextBuilder(Class<S> syncClientClass,
Class<A> asyncClientClass,
Properties properties)
withModules
public RestContextBuilder<S,A> withModules(Iterable<com.google.inject.Module> modules)
buildInjector
public com.google.inject.Injector buildInjector()
addLoggingModuleIfNotPresent
protected void addLoggingModuleIfNotPresent(List<com.google.inject.Module> modules)
addHttpModuleIfNeededAndNotPresent
protected void addHttpModuleIfNeededAndNotPresent(List<com.google.inject.Module> modules)
addContextModuleIfNotPresent
protected void addContextModuleIfNotPresent(List<com.google.inject.Module> modules)
addContextModule
protected void addContextModule(List<com.google.inject.Module> modules)
ifHttpConfigureRestOtherwiseGuiceClientFactory
protected void ifHttpConfigureRestOtherwiseGuiceClientFactory(List<com.google.inject.Module> modules)
addClientModuleIfNotPresent
protected void addClientModuleIfNotPresent(List<com.google.inject.Module> modules)
addClientModule
protected void addClientModule(List<com.google.inject.Module> modules)
addExecutorServiceIfNotPresent
protected void addExecutorServiceIfNotPresent(List<com.google.inject.Module> modules)
addCredentialStoreIfNotPresent
protected void addCredentialStoreIfNotPresent(List<com.google.inject.Module> modules)
getProperties
public Properties getProperties()
buildContext
public <T extends RestContext<S,A>> T buildContext()
Copyright © 2009-2011 jclouds. All Rights Reserved.