From 6c8e0435a5613fa37603bcc96ad6afbcc0a2a908 Mon Sep 17 00:00:00 2001 From: Ramnivas Laddad Date: Thu, 3 Apr 2014 12:31:59 -0700 Subject: [PATCH] Clarified that getCloud() may throw CloudException --- core/README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/README.md b/core/README.md index 854b49b..355e78e 100644 --- a/core/README.md +++ b/core/README.md @@ -19,7 +19,7 @@ Usage pattern: Application Developers * Create a [`CloudFactory`](src/main/java/org/springframework/cloud/CloudFactory.java) instance. Creation of a `CloudFactory` instance is a bit expensive, so caching such an instance is recommended. - If you are using a dependency inject frameworks such as Spring, creating a bean for `CloudFactory` + If you are using a dependency injection frameworks such as Spring, creating a bean for `CloudFactory` will achieve the caching effect. ```java @@ -31,7 +31,10 @@ Usage pattern: Application Developers ```java Cloud cloud = cloudFactory.getCloud(); ``` - + Note that you must have a `CloudConnector` implementation suitable + for the environment in which the application is being deployed in your classpath. For example, if you are + deploying the application in Cloud Foundry, you must add [cloudfoundry-connector](../cloudfoundry-connector) + in your classpath. If no suitable `CloudConnctor` is found, the `getCloud()` method will throw a `CloudException`. * Use the `Cloud` instance to get access to application info, service infos, and create service connectors.