org.jclouds.rest
Interface RestContext<S,A>

All Superinterfaces:
Location
All Known Implementing Classes:
RestContextImpl

public interface RestContext<S,A>
extends Location

Represents an authenticated context to the cloud.

Note

Please issue close() when you are finished with this context in order to release resources.

Author:
Adrian Cole

Method Summary
 void close()
          Closes all connections to Cloud Files.
 Map<String,Credentials> credentialStore()
           
 S getApi()
          reflects a tuned connection to the cloud which calls 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.
 URI getEndpoint()
           
 String getIdentity()
           
 Utils getUtils()
           
 Utils utils()
           
 
Methods inherited from interface org.jclouds.domain.Location
getDescription, getId, getIso3166Codes, getMetadata, getParent, getScope
 

Method Detail

getAsyncApi

A getAsyncApi()
low-level api to the cloud. Threadsafe implementations will return a singleton.

Returns:
a connection to the cloud where all methods return Futures

getApi

S getApi()
reflects a tuned connection to the cloud which calls getAsyncApi() with predetermined timeouts.

Returns:
a connection to the cloud where all methods block

getEndpoint

URI getEndpoint()

getApiVersion

String getApiVersion()
Returns:
version of the api presented by this service
See Also:
Constants.PROPERTY_API_VERSION

getBuildVersion

String getBuildVersion()
Returns:
version of software this service is running
See Also:
Constants.PROPERTY_BUILD_VERSION

getIdentity

String getIdentity()

getCredentialStore

@Beta
Map<String,Credentials> getCredentialStore()
retrieves a list of credentials for resources created within this context, keyed on id of the resource. We are testing this approach for resources such as compute nodes, where you could access this externally.


credentialStore

@Beta
Map<String,Credentials> credentialStore()

getUtils

Utils getUtils()

utils

Utils utils()
See Also:
getUtils()

close

void close()
Closes all connections to Cloud Files.



Copyright © 2009-2012 jclouds. All Rights Reserved.