Package io.hawt.util
Class Hosts
java.lang.Object
io.hawt.util.Hosts
Copied from Fabric8 v1 io.fabric8.utils.HostUtils
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Set<InetAddress>Returns aSetofInetAddressthat are non-loopback or mac.static StringReturns the local hostname.static StringReturns the local IP.static Map<String,Set<InetAddress>> getNetworkInterfaceAddresses(boolean includeLoopback)
-
Field Details
-
PREFERED_ADDRESS_PROPERTY_NAME
- See Also:
-
-
Method Details
-
getNetworkInterfaceAddresses
-
getAddresses
Returns aSetofInetAddressthat are non-loopback or mac. -
getLocalHostName
Returns the local hostname. It loops through the network interfaces and returns the first non loopback address- Throws:
UnknownHostException
-
getLocalIp
Returns the local IP. It loops through the network interfaces and returns the first non loopback address- Throws:
UnknownHostException
-