Java API for GeoIP2 webservice client and database reader
WebServiceProvider
interface has been added to facilitate mocking of
WebServiceClient
. Requested by Evan Chrisinger. GitHub #359.fromString
static method on the ConnectionType
enum now has
the JsonCreator
annotation so that it is used when deserializing.
This will prevent new additions in the future from causing a
deserialization error.isAnycast()
method was added to com.maxmind.geoip2.record.Traits
.
This returns true
if the IP address belongs to an anycast
network. This is available for the
GeoIP2 Country, City Plus, and Insights web services and the GeoIP2 Country,
City, and Enterprise databases.connection_type
from the GeoIP2 web services.maxmind-db
dependencies.SATELLITE
to the ConnectionType
enum.com.maxmind.db
is now a transitive dependency of this Java module.maxmind-db
dependencies.java.net.http.HttpClient
.close()
method on WebServiceClient
is now deprecated. It
no longer does anything.WebServiceClient.Builder
:
connectTimeout(int)
has been deprecated in favor of
connectTimeout(Duration)
.readTimeout(int)
has been deprecated in favor of
requestTimeout(Duration)
.proxy(Proxy)
has been deprecated in favor of proxy(ProxySelector)
.HttpException
and InvalidRequestException
, getUrl()
has been
deprecated in favor of getUri()
. Constructors that took a URL
have
been replaced with the equivalent taking a URI
.getGeoNameId()
on City
, Continent
, Country
, RepresentedCountry
,
and Subdivision
now returns a Long
rather than an Integer
.getAutonomousSystemNumber()
on AsnResponse
and Traits
now returns
a Long
rather than an Integer
.JsonProperty
annotations to getMobileCountryCode()
and
getMobileNetworkCode()
so that it is possible to serialize the
object as JSON and then deserialize without losing data.getMobileCountryCode()
and
getMobileNetworkCode()
were added to com.maxmind.geoip2.model.IspResponse
for the GeoIP2 ISP database and com.maxmind.geoip2.record.Traits
for the
Enterprise database and the GeoIP2 City and Insights web services. We expect
this data to be available by late January, 2022.