Package org.dasein.cloud

Base package for the Dasein Cloud API.

See:
          Description

Class Summary
AbstractCloud  
AsynchronousTask<T>  
CloudProvider Represents a provider of cloud services.
ProviderContext The contextual information necessary for making calls to a cloud provider.
TimeWindow  
 

Enum Summary
DataFormat  
DayOfWeek  
 

Exception Summary
CloudException Represents some kind of failure with the cloud provider or with the format of a request to the cloud provider.
InternalException Represents a local failure in the implementation of this API.
OperationNotSupportedException Thrown by a cloud service implementation in which a given operation is not supported though the general service has some level of support.
 

Package org.dasein.cloud Description

Base package for the Dasein Cloud API. The entry point into leveraging this library is the CloudProvider class. The API does not currently support any fancy bootstrapping mechanism. Instead, you simply construct an implementation of the CloudProvider API appropriate to your target cloud.

The cloud provider gives access to all supported services within the target cloud. Any service that is wholly unsupported will return null. An application will thus request its cloud provider using whatever bootstrapping mechanism is appropriate to its environment and then request the services it desires:

    // Print out all regions supported in this cloud
    CloudProvider provider = new AmazonWebServices();
    ProviderContext context = new ProviderContext();
    DataCenterServices dc;
    
    // Not shown: Setting the AWS access credentials 
    // When done, call provider.init(context) with the set credentials
    provider.connect(context);
    dc = provider.getDataCenterServices();
    for( Region region : dc.listRegions() ) {
        System.out.println(region.getName());
    }
  

Notes for Implementors

Begin implementing this API by writing an implementation of the CloudProvider abstract class. The simplest provider package for Dasein Cloud is an implementation of CloudProvider that returns null for all services. Of course, you probably want to tie into specific services and thus your implementation should return implementations of all relevant services.