public class Hostname
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getDisplayHostname(AgentConfig config,
java.lang.String defaultHostname)
This checks the configuration property agent_hostname.
|
static java.lang.String |
getFullHostname(AgentConfig config) |
static java.lang.String |
getHostname(AgentConfig config)
Return the cached hostname, if any, else determine and cache the hostname and return it.
|
static java.lang.String |
getHostname(AgentConfig config,
boolean invalidate)
Optionally invalidate the cache and then return the hostname.
|
static java.lang.String |
getInUseIpAddress(AgentConfig config) |
static java.util.ArrayList<java.lang.String> |
getIpAddress(AgentConfig config) |
protected static java.lang.Boolean |
preferIpv6(AgentConfig config)
Returns true if IPv6 is preferred, returns false otherwise
|
protected static void |
setInUseIpAddress(java.lang.String address) |
protected static void |
setIpAddress(java.util.ArrayList<java.lang.String> addresses) |
public static java.lang.String getDisplayHostname(AgentConfig config, java.lang.String defaultHostname)
public static java.lang.String getHostname(AgentConfig config, boolean invalidate)
config - The Agent config to used in hostname determinationinvalidate - if true, the currently-cached hostname is invalidatedpublic static java.lang.String getHostname(AgentConfig config)
config - The Agent config to used in hostname determinationpublic static java.lang.String getFullHostname(AgentConfig config)
protected static void setInUseIpAddress(java.lang.String address)
public static java.lang.String getInUseIpAddress(AgentConfig config)
protected static void setIpAddress(java.util.ArrayList<java.lang.String> addresses)
public static java.util.ArrayList<java.lang.String> getIpAddress(AgentConfig config)
protected static java.lang.Boolean preferIpv6(AgentConfig config)
config -