Class CfEnv

java.lang.Object
io.pivotal.cfenv.core.CfEnv

public class CfEnv extends Object
Provides access to Cloud Foundry environment variables.
Author:
Mark Pollack
  • Constructor Details

    • CfEnv

      public CfEnv()
    • CfEnv

      public CfEnv(String vcapApplicationJson, String vcapServicesJson)
  • Method Details

    • getApp

      public CfApplication getApp()
    • findAllServices

      public List<CfService> findAllServices()
    • findServicesByName

      public List<CfService> findServicesByName(String... spec)
    • findServiceByName

      public CfService findServiceByName(String... spec)
    • findServicesByLabel

      public List<CfService> findServicesByLabel(String... spec)
    • findServiceByLabel

      public CfService findServiceByLabel(String... spec)
    • findServiceByTag

      public CfService findServiceByTag(String... spec)
    • findServicesByTag

      public List<CfService> findServicesByTag(String... spec)
    • findCredentialsByName

      public CfCredentials findCredentialsByName(String... spec)
    • findCredentialsByLabel

      public CfCredentials findCredentialsByLabel(String... spec)
    • findCredentialsByTag

      public CfCredentials findCredentialsByTag(String... spec)
    • isInCf

      public boolean isInCf()
      Checks that the value of the environment variable VCAP_APPLICATION is not null, usually indicating that this application is running inside of Cloud Foundry
      Returns:
      true if the environment variable VCAP_APPLICATION is not null, false otherwise.