net.sf.mmapps.modules.cloudprovider
Class CloudProviderFactory

java.lang.Object
  extended by net.sf.mmapps.modules.cloudprovider.CloudProviderFactory

public class CloudProviderFactory
extends java.lang.Object

Factory for creating CloudProvider instances.
The CloudProviderFactory is configured using a property file named cloudprovider.properties. This file is retrieved using the resourcebundle mechanism TODO:add option to start MMBase

Version:
$Id: CloudProviderFactory.java,v 1.8 2005/07/31 12:35:03 keesj Exp $
Author:
Kees Jongenburger

Field Summary
static java.lang.String CLOUD_PROVIDER_CLASS_PROPERTY_NAME
          The name of the property in the CLOUD_PROVIDER_FACTORY_CONFIGURATION_RESOURCE_NAME the denotes the CloudProvider to use.
static java.lang.String CLOUD_PROVIDER_FACTORY_CONFIGURATION_RESOURCE_NAME
          The name of the bundle used to configure the cloudproviderfactory
static java.lang.String DEFAULT_CLOUD_PROVIDER_CLASS
          The default cloud provider class used when no property file named CLOUD_PROVIDER_CLASS_PROPERTY_NAME is found.
 
Method Summary
static CloudProvider getCloudProvider()
          static method that is to return a working CloudProvider
static CloudProvider getCloudProvider(java.lang.String name)
          static method which returns a working CloudProvider
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLOUD_PROVIDER_CLASS_PROPERTY_NAME

public static final java.lang.String CLOUD_PROVIDER_CLASS_PROPERTY_NAME
The name of the property in the CLOUD_PROVIDER_FACTORY_CONFIGURATION_RESOURCE_NAME the denotes the CloudProvider to use.

See Also:
Constant Field Values

CLOUD_PROVIDER_FACTORY_CONFIGURATION_RESOURCE_NAME

public static final java.lang.String CLOUD_PROVIDER_FACTORY_CONFIGURATION_RESOURCE_NAME
The name of the bundle used to configure the cloudproviderfactory

See Also:
Constant Field Values

DEFAULT_CLOUD_PROVIDER_CLASS

public static final java.lang.String DEFAULT_CLOUD_PROVIDER_CLASS
The default cloud provider class used when no property file named CLOUD_PROVIDER_CLASS_PROPERTY_NAME is found.

See Also:
Constant Field Values
Method Detail

getCloudProvider

public static CloudProvider getCloudProvider()
static method that is to return a working CloudProvider

Returns:
the CloudProvider instance
Throws:
java.lang.RuntimeException - if the CloudProviderFactory fails to create a new CloudProvider

getCloudProvider

public static CloudProvider getCloudProvider(java.lang.String name)
static method which returns a working CloudProvider

Parameters:
name - name of CloudProvider
Returns:
the CloudProvider instance
Throws:
java.lang.RuntimeException - when the CloudProviderFactory fails to create CloudProviders
java.lang.IllegalArgumentException - when CloudProvider with the name is not found


Copyright © 2003-2005 mmapps. All Rights Reserved.