com.maxmind.geoip2.model.CountryResponse Java Examples
The following examples show how to use
com.maxmind.geoip2.model.CountryResponse.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GeoIPCountryDissector.java From logparser with Apache License 2.0 | 5 votes |
public void dissect(final Parsable<?> parsable, final String inputname, final InetAddress ipAddress) throws DissectionFailure { CountryResponse response; try { response = reader.country(ipAddress); } catch (IOException | GeoIp2Exception e) { return; } extractCountryFields(parsable, inputname, response); }
Example #2
Source File: DatabaseReader.java From localization_nifi with Apache License 2.0 | 4 votes |
@Override public CountryResponse country(InetAddress ipAddress) throws IOException, GeoIp2Exception { return this.get(ipAddress, CountryResponse.class, true, "Country"); }
Example #3
Source File: DatabaseReader.java From nifi with Apache License 2.0 | 4 votes |
@Override public CountryResponse country(InetAddress ipAddress) throws IOException, GeoIp2Exception { return this.get(ipAddress, CountryResponse.class, true, "Country"); }
Example #4
Source File: DatabaseReader.java From nifi with Apache License 2.0 | 4 votes |
@Override public CountryResponse country(InetAddress ipAddress) throws IOException { return get(ipAddress, CountryResponse.class, true, "Country"); }
Example #5
Source File: WebServiceClient.java From GeoIP2-java with Apache License 2.0 | 4 votes |
@Override public CountryResponse country(InetAddress ipAddress) throws IOException, GeoIp2Exception { return this.responseFor("country", ipAddress, CountryResponse.class); }
Example #6
Source File: WebServiceClient.java From GeoIP2-java with Apache License 2.0 | 2 votes |
/** * @return A Country model for the requesting IP address * @throws GeoIp2Exception if there is an error from the web service * @throws IOException if an IO error happens during the request */ public CountryResponse country() throws IOException, GeoIp2Exception { return this.country(null); }
Example #7
Source File: GeoIp2Provider.java From GeoIP2-java with Apache License 2.0 | 2 votes |
/** * @param ipAddress IPv4 or IPv6 address to lookup. * @return A Country model for the requested IP address. * @throws GeoIp2Exception if there is an error looking up the IP * @throws IOException if there is an IO error */ CountryResponse country(InetAddress ipAddress) throws IOException, GeoIp2Exception;