public final class ConfigUtil extends Object
Config.| Modifier and Type | Field and Description |
|---|---|
static String |
HOSTING_ENVIRONMENT
The hosting environment config key.
|
| Modifier and Type | Method and Description |
|---|---|
static com.typesafe.config.Config |
determineConfig(String resourceBasename)
Determines the
Config to use based on the environment we are running in. |
static String |
getHostNameFromEnv()
Returns the host name determined from the environment variable "HOSTNAME".
|
static String |
getLocalHostAddress()
Returns the address of the host name which was determined by the env variable "HOSTNAME".
|
static String |
instanceIdentifier()
Returns the instance identifier based on the environment the service runs in.
|
public static final String HOSTING_ENVIRONMENT
public static com.typesafe.config.Config determineConfig(String resourceBasename)
Config to use based on the environment we are running in. Applies a simple logic: resourceBasename - the resource in the classpath to load config from (e.g. "things").public static String getHostNameFromEnv()
public static String getLocalHostAddress()
public static String instanceIdentifier()
Copyright © 2017–2018 Eclipse Foundation. All rights reserved.