org.jclouds.compute
Class ComputeServiceContextFactory

java.lang.Object
  extended by org.jclouds.compute.ComputeServiceContextFactory

public class ComputeServiceContextFactory
extends Object

Helper class to instantiate ComputeServiceContext instances.

Author:
Adrian Cole

Constructor Summary
ComputeServiceContextFactory()
          Initializes with the default properties built-in to jclouds.
ComputeServiceContextFactory(Properties properties)
          Finds definitions in the specified properties.
ComputeServiceContextFactory(RestContextFactory restContextFactory)
          Uses the supplied RestContextFactory to create ComputeServiceContexts
 
Method Summary
static
<S,A> ComputeServiceContext
buildContextUnwrappingExceptions(ComputeServiceContextBuilder<S,A> builder)
           
<S,A> ComputeServiceContext
createContext(RestContextSpec<S,A> contextSpec)
           
<S,A> ComputeServiceContext
createContext(RestContextSpec<S,A> contextSpec, Iterable<com.google.inject.Module> modules, Properties overrides)
           
<S,A> ComputeServiceContext
createContext(RestContextSpec<S,A> contextSpec, Properties overrides)
           
 ComputeServiceContext createContext(String provider, Iterable<? extends com.google.inject.Module> modules, Properties overrides)
           
 ComputeServiceContext createContext(String provider, Properties overrides)
           
 ComputeServiceContext createContext(String provider, String identity, String credential)
           
 ComputeServiceContext createContext(String provider, String identity, String credential, Iterable<? extends com.google.inject.Module> modules)
           
 ComputeServiceContext createContext(String provider, String identity, String credential, Iterable<? extends com.google.inject.Module> modules, Properties overrides)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComputeServiceContextFactory

public ComputeServiceContextFactory()
Initializes with the default properties built-in to jclouds. This is typically stored in the classpath resource rest.properties

See Also:
RestContextFactory.getPropertiesFromResource(java.lang.String)

ComputeServiceContextFactory

public ComputeServiceContextFactory(Properties properties)
Finds definitions in the specified properties.


ComputeServiceContextFactory

public ComputeServiceContextFactory(RestContextFactory restContextFactory)
Uses the supplied RestContextFactory to create ComputeServiceContexts

Method Detail

buildContextUnwrappingExceptions

public static <S,A> ComputeServiceContext buildContextUnwrappingExceptions(ComputeServiceContextBuilder<S,A> builder)

createContext

public ComputeServiceContext createContext(String provider,
                                           String identity,
                                           String credential)
See Also:
RestContextFactory.createContextBuilder(String, String, String)

createContext

public ComputeServiceContext createContext(String provider,
                                           Properties overrides)
See Also:
RestContextFactory.createContextBuilder(String, Properties)

createContext

public ComputeServiceContext createContext(String provider,
                                           Iterable<? extends com.google.inject.Module> modules,
                                           Properties overrides)
See Also:
RestContextFactory.createContextBuilder(String, Iterable)

createContext

public ComputeServiceContext createContext(String provider,
                                           @Nullable
                                           String identity,
                                           @Nullable
                                           String credential,
                                           Iterable<? extends com.google.inject.Module> modules)
See Also:
RestContextFactory.createContextBuilder(String, String,String, Iterable)

createContext

public ComputeServiceContext createContext(String provider,
                                           @Nullable
                                           String identity,
                                           @Nullable
                                           String credential,
                                           Iterable<? extends com.google.inject.Module> modules,
                                           Properties overrides)
See Also:
RestContextFactory.createContextBuilder(String, String,String, Iterable, Properties)

createContext

public <S,A> ComputeServiceContext createContext(RestContextSpec<S,A> contextSpec)
See Also:
RestContextFactory.createContextBuilder(RestContextSpec)

createContext

public <S,A> ComputeServiceContext createContext(RestContextSpec<S,A> contextSpec,
                                                 Properties overrides)
See Also:
RestContextFactory.createContextBuilder(RestContextSpec, Properties)

createContext

public <S,A> ComputeServiceContext createContext(RestContextSpec<S,A> contextSpec,
                                                 Iterable<com.google.inject.Module> modules,
                                                 Properties overrides)
See Also:
RestContextFactory.createContextBuilder(RestContextSpec, Iterable, Properties)


Copyright © 2009-2011 jclouds. All Rights Reserved.