Package org.wildfly.common.net
Class HostName
- java.lang.Object
-
- org.wildfly.common.net.HostName
-
public final class HostName extends java.lang.ObjectMethods 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.- Author:
- David M. Lloyd
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringgetHostName()Get the detected host name.static java.lang.StringgetNodeName()Get the node name.static java.lang.StringgetQualifiedHostName()Get the detected qualified host name.static voidsetNodeName(java.lang.String nodeName)Set the node name.static voidsetQualifiedHostName(java.lang.String qualifiedHostName)Set the host name.
-
-
-
Method Detail
-
getHostName
public static java.lang.String getHostName()
Get the detected host name.- Returns:
- the detected host name
-
getQualifiedHostName
public static java.lang.String getQualifiedHostName()
Get the detected qualified host name.- Returns:
- the detected qualified host name
-
getNodeName
public static java.lang.String getNodeName()
Get the node name.- Returns:
- the node name
-
setQualifiedHostName
public static void setQualifiedHostName(java.lang.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(java.lang.String nodeName)
Set the node name.- Parameters:
nodeName- the node name
-
-