Class ServicesData

java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<String,List<Map<String,Object>>>
org.springframework.credhub.support.ServicesData
All Implemented Interfaces:
Serializable, Cloneable, Map<String,List<Map<String,Object>>>

public class ServicesData extends HashMap<String,List<Map<String,Object>>>
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:
  • Constructor Details

    • ServicesData

      public ServicesData()
    • ServicesData

      public ServicesData(HashMap<String,List<Map<String,Object>>> data)
      Initialize with the provided HashMap.
      Parameters:
      data - a HashMap to initialize this data structure from