org.dasein.cloud
Class CloudProvider

java.lang.Object
  extended by org.dasein.cloud.CloudProvider
Direct Known Subclasses:
AbstractCloud

public abstract class CloudProvider
extends Object

Represents a provider of cloud services. The cloud provider API prescribes a number of services which may or may not be implemented for a given cloud. In addition, the cloud provider API describes the data center structure of the underlying cloud through the concept of regions. Each provider must have at least one region, which in turn has at least one zone or data center.

This API specifies a number of services that a given cloud provider may implement, but many cloud providers will not actually implement all of them. If a given service is not implemented, the API call for gaining access to that services should return null. An application should therefore test whether a service is null before trying to trigger operations in that cloud.

When implementing a given service for a particular provider, that provider may not support some of the operations of the service. Such methods should throw an OperationNotSupportedException to flag the lack of support.

Author:
George Reese @ enStratus (http://www.enstratus.com)

Constructor Summary
CloudProvider()
          Base contructor for a cloud provider.
 
Method Summary
 void close()
          Empties out all credentials and removes any other context information from the cloud provider implementation.
 void connect(ProviderContext context)
          Called to initialize a cloud provider with an operational context.
abstract  AccessServices getAccessServices()
          Provides access to the access services for managing authentication information with the provider.
abstract  AccountingServices getAccountingServices()
          Provides access to the accounting services for interacting with billing data for the provider.
abstract  AddressServices getAddressServices()
          Provides access to the address services for interacting with static IP addresses from this provider.
abstract  ContentDistributionServices getCdnServices()
          Provides access to the content distribution services for interacting with CDN support from the cloud provider.
abstract  String getCloudName()
          This value can be the same as getProviderName() if it is not a multi-cloud provider.
 ProviderContext getContext()
           
abstract  DataCenterServices getDataCenterServices()
          Provides access to the data center services that describe the physical structure of the underlying cloud provider.
abstract  FirewallServices getFirewallServices()
          Provides access to the firewall services for interacting with virtual firewalls and firewall management rules for this provider.
abstract  ImageServices getImageServices()
          Provides access to the server imaging services that describe the images/templates from which servers are launched.
abstract  KeyValueDatabaseServices getKeyValueDatabaseServices()
          Provides access to services for managing key/value database systems.
abstract  LoadBalancerServices getLoadBalancerServices()
          Provides access to the load balancing services that describe the load balancing for this provider.
abstract  NotificationsServices getNotificationsServices()
          Provides access to the notifications services that describe notifications for this cloud.
abstract  String getProviderName()
           
abstract  RelationalDatabaseServices getRelationalDatabaseServices()
          Provides access to services for managing relational database systems.
abstract  ScalingServices getScalingServices()
          Provides access to the auto-scaling features of the cloud.
abstract  ServerServices getServerServices()
          Provides access to the server-oriented services from this cloud provider.
abstract  SnapshotServices getSnapshotServices()
          Provides access to the snapshot services provided in this cloud.
abstract  StorageServices getStorageServices()
          Provides access to the cloud storage services supported by this cloud provider.
abstract  VolumeServices getVolumeServices()
          Provides access to the virtual block storage services offered by this cloud provider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CloudProvider

public CloudProvider()
Base contructor for a cloud provider.

Method Detail

close

public void close()
Empties out all credentials and removes any other context information from the cloud provider implementation.


connect

public final void connect(ProviderContext context)
Called to initialize a cloud provider with an operational context. The operational context includes authentication information, the regional context, and any cloud-specific context. Prior to initializing itself, this method will close out any existing state.

Parameters:
context - the context for services calls using this provider instance

getAccessServices

public abstract AccessServices getAccessServices()
Provides access to the access services for managing authentication information with the provider.

Returns:
an implementation of the AccessServices API for this provider

getAccountingServices

public abstract AccountingServices getAccountingServices()
Provides access to the accounting services for interacting with billing data for the provider.

Returns:
an implementation of the AccountingServices API for this provider

getAddressServices

public abstract AddressServices getAddressServices()
Provides access to the address services for interacting with static IP addresses from this provider.

Returns:
an implementation of the AddressServices API for this cloud provider

getContext

public final ProviderContext getContext()
Returns:
the operational context for this instance of this provider implementation

getCdnServices

public abstract ContentDistributionServices getCdnServices()
Provides access to the content distribution services for interacting with CDN support from the cloud provider.

Returns:
an implementation of the ContentDistributionServices API for this cloud provider

getCloudName

public abstract String getCloudName()
This value can be the same as getProviderName() if it is not a multi-cloud provider.

Returns:
the name of the cloud

getFirewallServices

public abstract FirewallServices getFirewallServices()
Provides access to the firewall services for interacting with virtual firewalls and firewall management rules for this provider.

Returns:
an implementation of the FirewallServices API

getDataCenterServices

public abstract DataCenterServices getDataCenterServices()
Provides access to the data center services that describe the physical structure of the underlying cloud provider.

Returns:
an implementation of the DataCenterServices API

getImageServices

public abstract ImageServices getImageServices()
Provides access to the server imaging services that describe the images/templates from which servers are launched.

Returns:
an implementation of the ImageServices API

getKeyValueDatabaseServices

public abstract KeyValueDatabaseServices getKeyValueDatabaseServices()
Provides access to services for managing key/value database systems.

Returns:
an implementation of the KeyValueDatabaseServices API

getLoadBalancerServices

public abstract LoadBalancerServices getLoadBalancerServices()
Provides access to the load balancing services that describe the load balancing for this provider.

Returns:
an implementation of the LoadBalancerServices API

getNotificationsServices

public abstract NotificationsServices getNotificationsServices()
Provides access to the notifications services that describe notifications for this cloud.

Returns:
an implementation of the NotificationsServices API

getProviderName

public abstract String getProviderName()
Returns:
the name of this cloud provider

getRelationalDatabaseServices

public abstract RelationalDatabaseServices getRelationalDatabaseServices()
Provides access to services for managing relational database systems.

Returns:
an implementation of the RelationalDatabaseServices API

getScalingServices

public abstract ScalingServices getScalingServices()
Provides access to the auto-scaling features of the cloud.

Returns:
an implementation of the ScalingServices API

getServerServices

public abstract ServerServices getServerServices()
Provides access to the server-oriented services from this cloud provider.

Returns:
an implementation of the ServerServices API

getSnapshotServices

public abstract SnapshotServices getSnapshotServices()
Provides access to the snapshot services provided in this cloud.

Returns:
an implementation of the SnapshotServices API

getStorageServices

public abstract StorageServices getStorageServices()
Provides access to the cloud storage services supported by this cloud provider.

Returns:
an implementation of the StorageServices API

getVolumeServices

public abstract VolumeServices getVolumeServices()
Provides access to the virtual block storage services offered by this cloud provider.

Returns:
an implementation of the VolumeServices API