Class ServicesData
Service data parsed from the VCAP_SERVICES environment variable provided to
applications running on Cloud Foundry.
If the VCAP_SERVICES environment variable for an application contains the
following:
{
"mysql": [
{
"label": "mysql",
"name": "mysql-db",
"plan": "100mb",
"tags": [ "mysql", "relational" ],
"credentials": {
"jdbcUrl": "jdbc:mysql://mysql-broker:3306/db?user=username&password=password",
"uri": "mysql://username:password@mysql-broker:3306/db?reconnect=true",
}
}
],
"rabbitmq": [
{
"label": "rabbitmq",
"name": "rabbit-queue",
"plan": "standard",
"tags": [ "rabbitmq", "messaging" ],
"credentials": {
"http_api_uri": "https://username:password@rabbitmq-broker:12345/api",
"uri": "amqp://username:password@rabbitmq-broker/vhost",
}
}
]
}
Then the ServicesData
data structure would hold the equivalent of this JSON
structure parsed to a Map.- Author:
- Scott Frederick
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
-
Method Summary
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Constructor Details
-
ServicesData
public ServicesData() -
ServicesData
Initialize with the providedHashMap
.- Parameters:
data
- a HashMap to initialize this data structure from
-