public final class NetworkUtils extends Object
Modifier and Type | Method and Description |
---|---|
static InetAddress |
getLocalHost() |
static String |
getLocalHostIp(String host)
Resolves a local IP for a host name.
|
static boolean |
isServerReachable(String host,
int port,
int timeout) |
static boolean |
isServerReachable(URL url,
int timeout) |
public static boolean isServerReachable(URL url, int timeout)
public static boolean isServerReachable(String host, int port, int timeout)
public static InetAddress getLocalHost() throws UnknownHostException
UnknownHostException
public static String getLocalHostIp(String host) throws UnknownHostException
InetAddress
since the InetAddress
performs logic each time it has to resolve the
host address.host
- the host nameUnknownHostException
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.