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.
 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()

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-2011 jclouds. All Rights Reserved.