org.jclouds.rest.internal
Class RestContextImpl<S,A>

java.lang.Object
  extended by org.jclouds.internal.ContextImpl
      extended by org.jclouds.rest.internal.RestContextImpl<S,A>
All Implemented Interfaces:
Closeable, Context, Location, RestContext<S,A>

public class RestContextImpl<S,A>
extends ContextImpl
implements RestContext<S,A>

Author:
Adrian Cole

Constructor Summary
protected RestContextImpl(String name, ProviderMetadata providerMetadata, String identity, Utils utils, Closer closer, com.google.inject.Injector injector, com.google.inject.TypeLiteral<S> syncApi, com.google.inject.TypeLiteral<A> asyncApi)
           
 
Method Summary
 S getApi()
          reflects a tuned connection to the cloud which calls RestContext.getAsyncApi() with predetermined timeouts.
 A getAsyncApi()
          low-level api to the cloud.
 
Methods inherited from class org.jclouds.internal.ContextImpl
close, credentialStore, equals, getApiVersion, getBuildVersion, getCredentialStore, getDescription, getEndpoint, getId, getIdentity, getIso3166Codes, getMetadata, getName, getParent, getProviderMetadata, getScope, getUtils, hashCode, toString, utils
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jclouds.Context
close, credentialStore, getApiVersion, getBuildVersion, getCredentialStore, getEndpoint, getIdentity, getName, getProviderMetadata, getUtils, utils
 
Methods inherited from interface org.jclouds.domain.Location
getDescription, getId, getIso3166Codes, getMetadata, getParent, getScope
 

Constructor Detail

RestContextImpl

@Inject
protected RestContextImpl(String name,
                                 ProviderMetadata providerMetadata,
                                 String identity,
                                 Utils utils,
                                 Closer closer,
                                 com.google.inject.Injector injector,
                                 com.google.inject.TypeLiteral<S> syncApi,
                                 com.google.inject.TypeLiteral<A> asyncApi)
Method Detail

getAsyncApi

public A getAsyncApi()
Description copied from interface: RestContext
low-level api to the cloud. Threadsafe implementations will return a singleton.

Specified by:
getAsyncApi in interface RestContext<S,A>
Returns:
a connection to the cloud where all methods return Futures

getApi

public S getApi()
Description copied from interface: RestContext
reflects a tuned connection to the cloud which calls RestContext.getAsyncApi() with predetermined timeouts.

Specified by:
getApi in interface RestContext<S,A>
Returns:
a connection to the cloud where all methods block


Copyright © 2009-2013 jclouds. All Rights Reserved.