Class HostName


  • public final class HostName
    extends java.lang.Object
    Methods for getting the system host name. The host name is detected from the environment, but may be overridden by use of the jboss.host.name and/or jboss.qualified.host.name system properties.
    Author:
    David M. Lloyd
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getHostName()
      Get the detected host name.
      static java.lang.String getNodeName()
      Get the node name.
      static java.lang.String getQualifiedHostName()
      Get the detected qualified host name.
      static void setNodeName​(java.lang.String nodeName)
      Set the node name.
      static void setQualifiedHostName​(java.lang.String qualifiedHostName)
      Set the host name.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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