Package io.hawt.util
Class Hosts
- java.lang.Object
-
- io.hawt.util.Hosts
-
public class Hosts extends java.lang.ObjectCopied from Fabric8 v1 io.fabric8.utils.HostUtils
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPREFERED_ADDRESS_PROPERTY_NAME
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Set<java.net.InetAddress>getAddresses()Returns aSetofInetAddressthat are non-loopback or mac.static java.lang.StringgetLocalHostName()Returns the local hostname.static java.lang.StringgetLocalIp()Returns the local IP.static java.util.Map<java.lang.String,java.util.Set<java.net.InetAddress>>getNetworkInterfaceAddresses(boolean includeLoopback)Returns aSetofInetAddressperNetworkInterfaceas aMap.
-
-
-
Field Detail
-
PREFERED_ADDRESS_PROPERTY_NAME
public static final java.lang.String PREFERED_ADDRESS_PROPERTY_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getNetworkInterfaceAddresses
public static java.util.Map<java.lang.String,java.util.Set<java.net.InetAddress>> getNetworkInterfaceAddresses(boolean includeLoopback)
Returns aSetofInetAddressperNetworkInterfaceas aMap.
-
getAddresses
public static java.util.Set<java.net.InetAddress> getAddresses()
Returns aSetofInetAddressthat are non-loopback or mac.
-
getLocalHostName
public static java.lang.String getLocalHostName() throws java.net.UnknownHostExceptionReturns the local hostname. It loops through the network interfaces and returns the first non loopback address- Throws:
java.net.UnknownHostException
-
getLocalIp
public static java.lang.String getLocalIp() throws java.net.UnknownHostExceptionReturns the local IP. It loops through the network interfaces and returns the first non loopback address- Throws:
java.net.UnknownHostException
-
-