public class CloudFactory extends Object
The main entry point for user code. Typical code directly using this class (as opposed to using a dependency-injection framework) will look like:
CloudFactory cloudFactory = new CloudFactory(); Cloud cloud = cloudFoundry.getCloud();Creating object of this class is somewhat expensive (due to scanning of various files to load connectors), so consider caching such an object if you create it manually. If you use a dependency-injection framework such as Spring, simply creating a bean for either CloudFactory or using this class as a factory-bean for
Cloud
will suffice.Constructor and Description |
---|
CloudFactory() |
Modifier and Type | Method and Description |
---|---|
Cloud |
getCloud() |
void |
registerCloudConnector(CloudConnector cloudConnector)
Register a cloud connector.
|
public Cloud getCloud()
CloudException
- if no suitable cloud foundpublic void registerCloudConnector(CloudConnector cloudConnector)
CloudConnector developers should prefer the declarative mechanism described in README.MD instead of calling this method.
cloudConnector
- the cloud connector to register for discovery