Top Description Fields Constructors Methods
io.smallrye.common.net

public final Class HostName

extends Object
Class Inheritance
Annotations
@SuppressWarnings:removal
Imports
java.net.InetAddress, .UnknownHostException, java.security.AccessController, io.smallrye.common.constraint.Assert

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.

Field Summary

Modifier and TypeField and Description
private static volatile String
private static final Object
private static volatile String
private static volatile String

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static String

Returns:

the detected host name
getHostName
()

Get the detected host name.

pack-priv static InetAddress
public static String

Returns:

the node name
getNodeName
()

Get the node name.

public static String

Returns:

the detected qualified host name
getQualifiedHostName
()

Get the detected qualified host name.

public static void
setNodeName(final String
the node name
nodeName
)

Set the node name.

public static void
setQualifiedHostName(final String
the host name
qualifiedHostName
)

Set the host name.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

hostNameback to summary
private static volatile String hostName
lockback to summary
private static final Object lock
nodeNameback to summary
private static volatile String nodeName
qualifiedHostNameback to summary
private static volatile String qualifiedHostName

Constructor Detail

HostNameback to summary
private HostName()

Method Detail

getHostNameback to summary
public static String getHostName()

Get the detected host name.

Returns:String

the detected host name

getLocalHostback to summary
pack-priv static InetAddress getLocalHost() throws UnknownHostException
getNodeNameback to summary
public static String getNodeName()

Get the node name.

Returns:String

the node name

getQualifiedHostNameback to summary
public static String getQualifiedHostName()

Get the detected qualified host name.

Returns:String

the detected qualified host name

setNodeNameback to summary
public static void setNodeName(final String nodeName)

Set the node name.

Parameters
nodeName:String

the node name

setQualifiedHostNameback to summary
public static void setQualifiedHostName(final 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:String

the host name