public class RestContextImpl<S,A> extends Object implements RestContext<S,A>
Modifier | Constructor and Description |
---|---|
protected |
RestContextImpl(Closer closer,
Map<String,Credentials> credentialStore,
Utils utils,
com.google.inject.Injector injector,
com.google.inject.TypeLiteral<S> syncApi,
com.google.inject.TypeLiteral<A> asyncApi,
com.google.common.base.Supplier<URI> endpoint,
String provider,
String identity,
String apiVersion,
String buildVersion,
Set<String> iso3166Codes) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes all connections to Cloud Files.
|
Map<String,Credentials> |
credentialStore() |
boolean |
equals(Object obj) |
S |
getApi()
reflects a tuned connection to the cloud which calls
RestContext.getAsyncApi() with predetermined
timeouts. |
String |
getApiVersion() |
A |
getAsyncApi()
low-level api to the cloud.
|
String |
getBuildVersion() |
Map<String,Credentials> |
getCredentialStore()
retrieves a list of credentials for resources created within this context, keyed on
id
of the resource. |
String |
getDescription()
Description of the location
|
URI |
getEndpoint() |
String |
getId()
Unique ID provided by the provider (us-standard, miami, etc)
|
String |
getIdentity() |
Set<String> |
getIso3166Codes() |
Map<String,Object> |
getMetadata() |
Location |
getParent()
The parent, or null, if top-level
|
LocationScope |
getScope()
Scope of the location, ex.
|
Utils |
getUtils() |
int |
hashCode() |
String |
toString() |
Utils |
utils() |
@Inject protected RestContextImpl(Closer closer, Map<String,Credentials> credentialStore, Utils utils, com.google.inject.Injector injector, com.google.inject.TypeLiteral<S> syncApi, com.google.inject.TypeLiteral<A> asyncApi, com.google.common.base.Supplier<URI> endpoint, String provider, String identity, String apiVersion, String buildVersion, Set<String> iso3166Codes)
public void close()
close
in interface RestContext<S,A>
Closer
public String getIdentity()
getIdentity
in interface RestContext<S,A>
public A getAsyncApi()
RestContext
getAsyncApi
in interface RestContext<S,A>
Future
spublic S getApi()
RestContext
RestContext.getAsyncApi()
with predetermined
timeouts.getApi
in interface RestContext<S,A>
public URI getEndpoint()
getEndpoint
in interface RestContext<S,A>
public Utils getUtils()
getUtils
in interface RestContext<S,A>
public Utils utils()
utils
in interface RestContext<S,A>
RestContext.getUtils()
public String getApiVersion()
getApiVersion
in interface RestContext<S,A>
Constants.PROPERTY_API_VERSION
public String getBuildVersion()
getBuildVersion
in interface RestContext<S,A>
Constants.PROPERTY_BUILD_VERSION
public Map<String,Credentials> getCredentialStore()
RestContext
id
of the resource. We are testing this approach for resources such as compute nodes, where you
could access this externally.getCredentialStore
in interface RestContext<S,A>
public Map<String,Credentials> credentialStore()
credentialStore
in interface RestContext<S,A>
public String getDescription()
Location
getDescription
in interface Location
public String getId()
Location
public Set<String> getIso3166Codes()
getIso3166Codes
in interface Location
public Map<String,Object> getMetadata()
getMetadata
in interface Location
public Location getParent()
Location
public LocationScope getScope()
Location
Copyright © 2009-2012 jclouds. All Rights Reserved.