public class UtraceHostGeoLookup extends java.lang.Object implements HostGeoLookup
Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
log |
Constructor and Description |
---|
UtraceHostGeoLookup() |
Modifier and Type | Method and Description |
---|---|
HostGeoInfo |
getHostGeoInfo(java.net.InetAddress address)
does the
retrieveHostGeoInfo(InetAddress) , but in the background with a default timeout |
HostGeoInfo |
getHostGeoInfo(java.net.InetAddress address,
Duration timeout)
does a
retrieveHostGeoInfo(InetAddress) with a timeout (returning null, interrupting, and setting failure time) |
static java.lang.String |
getLocalhostExternalIp()
Deprecated.
since 0.7.0. Use
LocalhostExternalIpLoader instead. |
static java.lang.String |
getLocalhostExternalIpImpl()
Deprecated.
since 0.7.0. Use
LocalhostExternalIpLoader instead. |
java.lang.String |
getLookupUrlFor(java.net.InetAddress address)
returns URL to get properties for the given address (assuming localhost if address is on a subnet)
|
java.lang.String |
getLookupUrlForLocalhost() |
java.lang.String |
getLookupUrlForPublicIp(java.lang.String ip) |
HostGeoInfo |
retrieveHostGeoInfo(java.net.InetAddress address) |
public java.lang.String getLookupUrlForPublicIp(java.lang.String ip)
@Deprecated public static java.lang.String getLocalhostExternalIp()
LocalhostExternalIpLoader
instead.@Deprecated public static java.lang.String getLocalhostExternalIpImpl()
LocalhostExternalIpLoader
instead.public java.lang.String getLookupUrlForLocalhost()
public java.lang.String getLookupUrlFor(java.net.InetAddress address)
public HostGeoInfo getHostGeoInfo(java.net.InetAddress address) throws java.net.MalformedURLException, java.io.IOException
retrieveHostGeoInfo(InetAddress)
, but in the background with a default timeoutgetHostGeoInfo
in interface HostGeoLookup
java.net.MalformedURLException
java.io.IOException
public HostGeoInfo getHostGeoInfo(java.net.InetAddress address, Duration timeout) throws java.net.MalformedURLException, java.io.IOException
retrieveHostGeoInfo(InetAddress)
with a timeout (returning null, interrupting, and setting failure time)java.net.MalformedURLException
java.io.IOException
public HostGeoInfo retrieveHostGeoInfo(java.net.InetAddress address) throws java.net.MalformedURLException, java.io.IOException
java.net.MalformedURLException
java.io.IOException