Package io.smallrye.common.net
Class HostName
- java.lang.Object
-
- io.smallrye.common.net.HostName
-
public final class HostName extends Object
Methods for getting the system host name. The host name is detected from the environment, but may be overridden by use of thejboss.host.nameand/orjboss.qualified.host.namesystem properties.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetHostName()Get the detected host name.static StringgetNodeName()Get the node name.static StringgetQualifiedHostName()Get the detected qualified host name.static voidsetNodeName(String nodeName)Set the node name.static voidsetQualifiedHostName(String qualifiedHostName)Set the host name.
-
-
-
Method Detail
-
getHostName
public static String getHostName()
Get the detected host name.- Returns:
- the detected host name
-
getQualifiedHostName
public static String getQualifiedHostName()
Get the detected qualified host name.- Returns:
- the detected qualified host name
-
getNodeName
public static String getNodeName()
Get the node name.- Returns:
- the node name
-
setQualifiedHostName
public static void setQualifiedHostName(String qualifiedHostName)
Set the host name. The qualified host name is set directly from the given value; the unqualified host name is then re-derived from that value. The node name is not changed by this method.- Parameters:
qualifiedHostName- the host name
-
setNodeName
public static void setNodeName(String nodeName)
Set the node name.- Parameters:
nodeName- the node name
-
-