Explain the use of ServiceInfo.ServiceLabel (fix #52)

This commit is contained in:
Ramnivas Laddad
2014-07-25 09:55:18 -07:00
parent 5cf3a9b2d3
commit fb85510432
2 changed files with 11 additions and 3 deletions

View File

@@ -201,9 +201,11 @@ public class Cloud {
* </pre>
*
* <p>
* If a there is only a single service of a given type, that service is aliased to the service type. Keys for such properties
* start in <code>cloud.services.&lt;service-type&gt;</code>. For example, if there is only a single MySQL service bound to the
* application, the service properties will also be exposed starting with '<code>cloud.services.mysql</code>' key: <pre>
* If a there is only a single service of a given type (as defined by the {@link ServiceInfo.ServiceLabel}
* annoation's value of the corresponding {@link ServiceInfo} class), that service is aliased
* to the service type. Keys for such properties start in <code>cloud.services.&lt;service-type&gt;</code>.
* For example, if there is only a single MySQL service bound to the application, the service properties
* will also be exposed starting with '<code>cloud.services.mysql</code>' key: <pre>
* cloud.services.mysql.type = mysql-5.1
* cloud.services.mysql.plan = free
* cloud.services.mysql.connection.hostname = ...

View File

@@ -19,6 +19,12 @@ public interface ServiceInfo {
/**
* Annotation to mark service label (used in presenting properties)
*
* <p>
* If a {@link ServiceInfo} class carries this annotation, it is used categorize
* similar services together for the purpose of exposing cloud properties.
* </p>
*
* @see Cloud#getCloudProperties()
*/
@Inherited