org.jclouds.providers
Class Providers

java.lang.Object
  extended by org.jclouds.providers.Providers

public class Providers
extends Object

The Providers class provides static methods for accessing providers.

Author:
Jeremy Whitlock

Constructor Summary
Providers()
           
 
Method Summary
static Iterable<ProviderMetadata> all()
          Returns all available providers.
static Iterable<ProviderMetadata> allBlobStore()
          Returns the providers that are of type ProviderMetadata.BLOBSTORE_TYPE.
static Iterable<ProviderMetadata> allCompute()
          Returns the providers that are of type ProviderMetadata.COMPUTE_TYPE.
static Iterable<ProviderMetadata> allLoadBalancer()
          Returns the providers that are of type ProviderMetadata.LOADBALANCER_TYPE.
static Iterable<ProviderMetadata> allQueue()
          Returns the providers that are of type ProviderMetadata.QUEUE_TYPE.
static Iterable<ProviderMetadata> allTable()
          Returns the providers that are of type ProviderMetadata.TABLE_TYPE.
static Iterable<ProviderMetadata> boundedByIso3166Code(String iso3166Code)
          Returns the providers that are bound to the same location as the given ISO 3166 code regardless of type.
static Iterable<ProviderMetadata> boundedByIso3166Code(String iso3166Code, String type)
          Returns the providers that are bound to the same location as the given ISO 3166 code and of the given type.
static Iterable<ProviderMetadata> collocatedWith(ProviderMetadata providerMetadata)
          Returns the providers that have at least one common ISO 3166 code in common regardless of type.
static Iterable<ProviderMetadata> collocatedWith(ProviderMetadata providerMetadata, String type)
          Returns the providers that have at least one common ISO 3166 code and are of the given type.
static Iterable<ProviderMetadata> ofType(String type)
          Returns the providers that are of the provided type.
static ProviderMetadata withId(String id)
          Returns the first provider with the provided id
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Providers

public Providers()
Method Detail

all

public static Iterable<ProviderMetadata> all()
Returns all available providers.

Returns:
all available providers

withId

public static ProviderMetadata withId(String id)
                               throws NoSuchElementException
Returns the first provider with the provided id

Parameters:
id - the id of the provider to return
Returns:
the provider with the given id
Throws:
NoSuchElementException - whenever there are no providers with the provided id

allBlobStore

public static Iterable<ProviderMetadata> allBlobStore()
Returns the providers that are of type ProviderMetadata.BLOBSTORE_TYPE.

Returns:
the blobstore providers

allCompute

public static Iterable<ProviderMetadata> allCompute()
Returns the providers that are of type ProviderMetadata.COMPUTE_TYPE.

Returns:
the compute service providers

allQueue

public static Iterable<ProviderMetadata> allQueue()
Returns the providers that are of type ProviderMetadata.QUEUE_TYPE.

Returns:
the queue service providers

allTable

public static Iterable<ProviderMetadata> allTable()
Returns the providers that are of type ProviderMetadata.TABLE_TYPE.

Returns:
the table service providers

allLoadBalancer

public static Iterable<ProviderMetadata> allLoadBalancer()
Returns the providers that are of type ProviderMetadata.LOADBALANCER_TYPE.

Returns:
the load balancer service providers

ofType

public static Iterable<ProviderMetadata> ofType(String type)
Returns the providers that are of the provided type.

Parameters:
type - the type to providers to return
Returns:
the providers of the provided type

boundedByIso3166Code

public static Iterable<ProviderMetadata> boundedByIso3166Code(String iso3166Code)
Returns the providers that are bound to the same location as the given ISO 3166 code regardless of type.

Parameters:
isoCode - the ISO 3166 code to filter providers by
Returns:
the providers bound by the given ISO 3166 code

boundedByIso3166Code

public static Iterable<ProviderMetadata> boundedByIso3166Code(String iso3166Code,
                                                              String type)
Returns the providers that are bound to the same location as the given ISO 3166 code and of the given type.

Parameters:
iso3166Code - the ISO 3166 code to filter providers by
type - the type to filter providers by
Returns:
the providers bound by the given ISO 3166 code and of the proper type

collocatedWith

public static Iterable<ProviderMetadata> collocatedWith(ProviderMetadata providerMetadata)
Returns the providers that have at least one common ISO 3166 code in common regardless of type.

Parameters:
providerMetadata - the provider metadata to use to filter providers by
Returns:
the providers that share at least one common ISO 3166 code

collocatedWith

public static Iterable<ProviderMetadata> collocatedWith(ProviderMetadata providerMetadata,
                                                        String type)
Returns the providers that have at least one common ISO 3166 code and are of the given type.

Parameters:
providerMetadata - the provider metadata to use to filter providers by
type - the type to filter providers by
Returns:
the providers that share at least one common ISO 3166 code and of the given type


Copyright © 2009-2012 jclouds. All Rights Reserved.