|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jclouds.rest.RestContextFactory
public class RestContextFactory
Helper class to instantiate 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 Summary | |
---|---|
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. |
Method Summary | ||
---|---|---|
static
|
buildContextUnwrappingExceptions(RestContextBuilder<S,A> builder)
|
|
static
|
contextSpec(String provider,
String endpoint,
String apiVersion,
String buildVersion,
String iso3166Codes,
String identity,
String credential,
Class<S> sync,
Class<A> async)
|
|
static
|
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
|
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
|
createContext(RestContextSpec<S,A> contextSpec)
|
|
static
|
createContext(RestContextSpec<S,A> contextSpec,
Iterable<com.google.inject.Module> modules)
|
|
static
|
createContext(RestContextSpec<S,A> contextSpec,
Iterable<com.google.inject.Module> modules,
Properties overrides)
|
|
static
|
createContext(RestContextSpec<S,A> contextSpec,
Properties overrides)
|
|
|
createContext(String provider,
Iterable<? extends com.google.inject.Module> wiring,
Properties overrides)
|
|
|
createContext(String provider,
Properties overrides)
|
|
|
createContext(String provider,
String identity,
String credential)
|
|
|
createContext(String provider,
String identity,
String credential,
Iterable<? extends com.google.inject.Module> wiring)
|
|
|
createContext(String provider,
String identity,
String credential,
Iterable<? extends com.google.inject.Module> wiring,
Properties overrides)
|
|
|
createContext(String provider,
String identity,
String credential,
Properties properties)
|
|
static
|
createContextBuilder(RestContextSpec<S,A> contextSpec)
|
|
static
|
createContextBuilder(RestContextSpec<S,A> contextSpec,
Iterable<com.google.inject.Module> modules)
|
|
static
|
createContextBuilder(RestContextSpec<S,A> contextSpec,
Iterable<com.google.inject.Module> modules,
Properties overrides)
|
|
static
|
createContextBuilder(RestContextSpec<S,A> contextSpec,
Properties overrides)
|
|
|
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. |
|
|
createContextBuilder(String provider,
Iterable<com.google.inject.Module> modules)
|
|
|
createContextBuilder(String provider,
Properties overrides)
|
|
|
createContextBuilder(String provider,
String identity,
String credential)
|
|
|
createContextBuilder(String provider,
String identity,
String credential,
Iterable<? extends com.google.inject.Module> wiring)
|
|
|
createContextBuilder(String providerName,
String identity,
String credential,
Iterable<? extends com.google.inject.Module> wiring,
Properties _overrides)
Creates a new remote context. |
|
|
createContextBuilder(String provider,
String identity,
String credential,
Properties properties)
|
|
|
createContextSpec(String providerName,
String identity,
String credential,
Iterable<? extends com.google.inject.Module> wiring,
Properties _overrides)
|
|
|
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RestContextFactory()
rest.properties
getPropertiesFromResource(java.lang.String)
public RestContextFactory(String filename)
filename
filename
- name of the properties file to initialize from
IOException
- if the default properties file cannot be loadedgetPropertiesFromResource(java.lang.String)
@Inject public RestContextFactory(Properties properties)
RestContext
definitions from the specified properties.
Method Detail |
---|
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 path
public <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)
createContextBuilder(String, String, String)
public static <S,A> RestContext<S,A> buildContextUnwrappingExceptions(RestContextBuilder<S,A> builder)
public <S,A> RestContext<S,A> createContext(String provider, Properties overrides)
createContextBuilder(String, Properties)
public <S,A> RestContext<S,A> createContext(String provider, Iterable<? extends com.google.inject.Module> wiring, Properties overrides)
createContextBuilder(String, Iterable)
public <S,A> RestContext<S,A> createContext(String provider, @Nullable String identity, @Nullable String credential, Properties properties)
createContextBuilder(String, String,String, Properties)
public <S,A> RestContext<S,A> createContext(String provider, @Nullable String identity, @Nullable String credential, Iterable<? extends com.google.inject.Module> wiring)
createContextBuilder(String, String,String, Iterable)
public <S,A> RestContext<S,A> createContext(String provider, @Nullable String identity, @Nullable String credential, Iterable<? extends com.google.inject.Module> wiring, Properties overrides)
createContextBuilder(String, String,String, Iterable, Properties)
public static <S,A> RestContext<S,A> createContext(RestContextSpec<S,A> contextSpec)
createContextBuilder(RestContextSpec)
public static <S,A> RestContext<S,A> createContext(RestContextSpec<S,A> contextSpec, Properties overrides)
createContextBuilder(RestContextSpec, Properties)
public static <S,A> RestContext<S,A> createContext(RestContextSpec<S,A> contextSpec, Iterable<com.google.inject.Module> modules)
createContextBuilder(RestContextSpec, Iterable)
public static <S,A> RestContext<S,A> createContext(RestContextSpec<S,A> contextSpec, Iterable<com.google.inject.Module> modules, Properties overrides)
createContextBuilder(RestContextSpec, Iterable, Properties)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |