public class RestContextFactory extends Object
RestContext
instances. "blobstore.properties"
At least one property is needed needed per context:
azureblob.contextbuilder=org.jclouds.azure.storage.blob.blobstore.AzureRestContextBuilder azureblob.propertiesbuilder=org.jclouds.azure.storage.blob.AzureBlobPropertiesBuilder
Constructor and Description |
---|
RestContextFactory()
Initializes with the default properties built-in to jclouds.
|
RestContextFactory(Properties properties)
Initializes the
RestContext definitions from the specified properties. |
RestContextFactory(String filename)
Initializes with the default properties built-in to jclouds.
|
Modifier and Type | Method and Description |
---|---|
static <S,A> RestContext<S,A> |
buildContextUnwrappingExceptions(RestContextBuilder<S,A> builder) |
static <S,A> RestContextSpec<S,A> |
contextSpec(String provider,
String endpoint,
String apiVersion,
String buildVersion,
String iso3166Codes,
String identity,
String credential,
Class<S> sync,
Class<A> async) |
static <S,A> RestContextSpec<S,A> |
contextSpec(String provider,
String endpoint,
String apiVersion,
String buildVersion,
String iso3166Codes,
String identity,
String credential,
Class<S> sync,
Class<A> async,
Class<PropertiesBuilder> propertiesBuilderClass,
Class<RestContextBuilder<S,A>> contextBuilderClass,
Iterable<com.google.inject.Module> modules) |
static <S,A> RestContextSpec<S,A> |
contextSpec(String provider,
String endpoint,
String apiVersion,
String buildVersion,
String iso3166Codes,
String identity,
String credential,
Class<S> sync,
Class<A> async,
Iterable<com.google.inject.Module> modules) |
static <S,A> RestContext<S,A> |
createContext(RestContextSpec<S,A> contextSpec) |
static <S,A> RestContext<S,A> |
createContext(RestContextSpec<S,A> contextSpec,
Iterable<com.google.inject.Module> modules) |
static <S,A> RestContext<S,A> |
createContext(RestContextSpec<S,A> contextSpec,
Iterable<com.google.inject.Module> modules,
Properties overrides) |
static <S,A> RestContext<S,A> |
createContext(RestContextSpec<S,A> contextSpec,
Properties overrides) |
<S,A> RestContext<S,A> |
createContext(String provider,
Iterable<? extends com.google.inject.Module> wiring,
Properties overrides) |
<S,A> RestContext<S,A> |
createContext(String provider,
Properties overrides) |
<S,A> RestContext<S,A> |
createContext(String provider,
String identity,
String credential) |
<S,A> RestContext<S,A> |
createContext(String provider,
String identity,
String credential,
Iterable<? extends com.google.inject.Module> wiring) |
<S,A> RestContext<S,A> |
createContext(String provider,
String identity,
String credential,
Iterable<? extends com.google.inject.Module> wiring,
Properties overrides) |
<S,A> RestContext<S,A> |
createContext(String provider,
String identity,
String credential,
Properties properties) |
static <S,A> RestContextBuilder<S,A> |
createContextBuilder(RestContextSpec<S,A> contextSpec) |
static <S,A> RestContextBuilder<S,A> |
createContextBuilder(RestContextSpec<S,A> contextSpec,
Iterable<com.google.inject.Module> modules) |
static <S,A> RestContextBuilder<S,A> |
createContextBuilder(RestContextSpec<S,A> contextSpec,
Iterable<com.google.inject.Module> modules,
Properties overrides) |
static <S,A> RestContextBuilder<S,A> |
createContextBuilder(RestContextSpec<S,A> contextSpec,
Properties overrides) |
<S,A> RestContextBuilder<S,A> |
createContextBuilder(String provider,
Iterable<? extends com.google.inject.Module> wiring,
Properties overrides)
Identity will be found by searching
jclouds.identity failing that
provider.identity where provider corresponds to the parameter. |
<S,A> RestContextBuilder<S,A> |
createContextBuilder(String provider,
Iterable<com.google.inject.Module> modules) |
<S,A> RestContextBuilder<S,A> |
createContextBuilder(String provider,
Properties overrides) |
<S,A> RestContextBuilder<S,A> |
createContextBuilder(String provider,
String identity,
String credential) |
<S,A> RestContextBuilder<S,A> |
createContextBuilder(String provider,
String identity,
String credential,
Iterable<? extends com.google.inject.Module> wiring) |
<S,A> RestContextBuilder<S,A> |
createContextBuilder(String providerName,
String identity,
String credential,
Iterable<? extends com.google.inject.Module> wiring,
Properties _overrides)
Creates a new remote context.
|
<S,A> RestContextBuilder<S,A> |
createContextBuilder(String provider,
String identity,
String credential,
Properties properties) |
<S,A> RestContextSpec<S,A> |
createContextSpec(String providerName,
String identity,
String credential,
Iterable<? extends com.google.inject.Module> wiring,
Properties _overrides) |
<S,A> RestContextSpec<S,A> |
createContextSpec(String providerName,
String identity,
String credential,
Properties _overrides) |
static Properties |
getPropertiesFromResource(String filename)
Loads the default properties that define the
RestContext objects. |
static Properties |
toProperties(RestContextSpec<?,?> contextSpec) |
public RestContextFactory()
rest.properties
public RestContextFactory(String filename)
filename
filename
- name of the properties file to initialize fromIOException
- if the default properties file cannot be loadedgetPropertiesFromResource(java.lang.String)
@Inject public RestContextFactory(Properties properties)
RestContext
definitions from the specified properties.public static <S,A> RestContextSpec<S,A> contextSpec(String provider, String endpoint, String apiVersion, String buildVersion, String iso3166Codes, String identity, String credential, Class<S> sync, Class<A> async, Class<PropertiesBuilder> propertiesBuilderClass, Class<RestContextBuilder<S,A>> contextBuilderClass, Iterable<com.google.inject.Module> modules)
public static <S,A> RestContextSpec<S,A> contextSpec(String provider, String endpoint, String apiVersion, String buildVersion, String iso3166Codes, String identity, String credential, Class<S> sync, Class<A> async)
public static <S,A> RestContextSpec<S,A> contextSpec(String provider, String endpoint, String apiVersion, String buildVersion, String iso3166Codes, String identity, String credential, Class<S> sync, Class<A> async, Iterable<com.google.inject.Module> modules)
public static Properties getPropertiesFromResource(String filename)
RestContext
objects. azureblob.contextbuilder=org.jclouds.azure.storage.blob.blobstore.AzureRestContextBuilder azureblob.propertiesbuilder=org.jclouds.azure.storage.blob.AzureBlobPropertiesBuilder
filename
- name of file to load from in the resource pathpublic <S,A> RestContextBuilder<S,A> createContextBuilder(String provider, String identity, String credential)
public <S,A> RestContextBuilder<S,A> createContextBuilder(String provider, Properties overrides)
RestContextFactory#createContextBuilder(String, Properties, Iterable extends Module>,
Properties)
public <S,A> RestContextBuilder<S,A> createContextBuilder(String provider, Iterable<com.google.inject.Module> modules)
RestContextFactory#createContextBuilder(String, Properties, Iterable extends Module>,
Properties)
public <S,A> RestContextBuilder<S,A> createContextBuilder(String provider, Iterable<? extends com.google.inject.Module> wiring, Properties overrides)
jclouds.identity
failing that
provider.identity
where provider corresponds to the parameter. Same pattern is used
for credential (jclouds.credential
failing that provider.credential
).S
- Type of the provider specific clientA
- Type of the provide specific async client (same as above, yet all methods return
Future
results)provider
- name of the provider (ex. s3, bluelock, etc.)wiring
- defines how objects are bound to interfaces, pass in here to override this, or
specify service implementations.overrides
- properties to pass to the context.public <S,A> RestContextBuilder<S,A> createContextBuilder(String provider, @Nullable String identity, @Nullable String credential, Properties properties)
public <S,A> RestContextBuilder<S,A> createContextBuilder(String provider, @Nullable String identity, @Nullable String credential, Iterable<? extends com.google.inject.Module> wiring)
public <S,A> RestContextBuilder<S,A> createContextBuilder(String providerName, @Nullable String identity, @Nullable String credential, Iterable<? extends com.google.inject.Module> wiring, Properties _overrides)
provider
- identity
- nullable, if credentials are present in the overridescredential
- nullable, if credentials are present in the overrideswiring
- Configuration you'd like to pass to the context. Ex. ImmutableSet.overrides
- properties to override defaults with.public static Properties toProperties(RestContextSpec<?,?> contextSpec)
public <S,A> RestContextSpec<S,A> createContextSpec(String providerName, String identity, String credential, Properties _overrides)
public <S,A> RestContextSpec<S,A> createContextSpec(String providerName, String identity, String credential, Iterable<? extends com.google.inject.Module> wiring, Properties _overrides)
public static <S,A> RestContextBuilder<S,A> createContextBuilder(RestContextSpec<S,A> contextSpec)
public static <S,A> RestContextBuilder<S,A> createContextBuilder(RestContextSpec<S,A> contextSpec, Properties overrides)
public static <S,A> RestContextBuilder<S,A> createContextBuilder(RestContextSpec<S,A> contextSpec, Iterable<com.google.inject.Module> modules)
public static <S,A> RestContextBuilder<S,A> createContextBuilder(RestContextSpec<S,A> contextSpec, Iterable<com.google.inject.Module> modules, Properties overrides)
public <S,A> RestContext<S,A> createContext(String provider, String identity, String credential)
public static <S,A> RestContext<S,A> buildContextUnwrappingExceptions(RestContextBuilder<S,A> builder)
public <S,A> RestContext<S,A> createContext(String provider, Properties overrides)
public <S,A> RestContext<S,A> createContext(String provider, Iterable<? extends com.google.inject.Module> wiring, Properties overrides)
public <S,A> RestContext<S,A> createContext(String provider, @Nullable String identity, @Nullable String credential, Properties properties)
public <S,A> RestContext<S,A> createContext(String provider, @Nullable String identity, @Nullable String credential, Iterable<? extends com.google.inject.Module> wiring)
public <S,A> RestContext<S,A> createContext(String provider, @Nullable String identity, @Nullable String credential, Iterable<? extends com.google.inject.Module> wiring, Properties overrides)
public static <S,A> RestContext<S,A> createContext(RestContextSpec<S,A> contextSpec)
public static <S,A> RestContext<S,A> createContext(RestContextSpec<S,A> contextSpec, Properties overrides)
public static <S,A> RestContext<S,A> createContext(RestContextSpec<S,A> contextSpec, Iterable<com.google.inject.Module> modules)
public static <S,A> RestContext<S,A> createContext(RestContextSpec<S,A> contextSpec, Iterable<com.google.inject.Module> modules, Properties overrides)
Copyright © 2009-2012 jclouds. All Rights Reserved.