Package com.maxmind.geoip2
Interface GeoIp2Provider
-
- All Known Subinterfaces:
DatabaseProvider
- All Known Implementing Classes:
DatabaseReader
,WebServiceClient
public interface GeoIp2Provider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CityResponse
city(InetAddress ipAddress)
CountryResponse
country(InetAddress ipAddress)
-
-
-
Method Detail
-
country
CountryResponse country(InetAddress ipAddress) throws IOException, GeoIp2Exception
- Parameters:
ipAddress
- IPv4 or IPv6 address to lookup.- Returns:
- A Country model for the requested IP address.
- Throws:
GeoIp2Exception
- if there is an error looking up the IPIOException
- if there is an IO error
-
city
CityResponse city(InetAddress ipAddress) throws IOException, GeoIp2Exception
- Parameters:
ipAddress
- IPv4 or IPv6 address to lookup.- Returns:
- A City model for the requested IP address.
- Throws:
GeoIp2Exception
- if there is an error looking up the IPIOException
- if there is an IO error
-
-