11package com .maxmind .geoip2 ;
22
33import com .maxmind .geoip2 .exception .GeoIp2Exception ;
4- import com .maxmind .geoip2 .model .*;
5-
4+ import com .maxmind .geoip2 .model .AnonymousIpResponse ;
5+ import com .maxmind .geoip2 .model .AsnResponse ;
6+ import com .maxmind .geoip2 .model .CityResponse ;
7+ import com .maxmind .geoip2 .model .ConnectionTypeResponse ;
8+ import com .maxmind .geoip2 .model .CountryResponse ;
9+ import com .maxmind .geoip2 .model .DomainResponse ;
10+ import com .maxmind .geoip2 .model .EnterpriseResponse ;
11+ import com .maxmind .geoip2 .model .IpRiskResponse ;
12+ import com .maxmind .geoip2 .model .IspResponse ;
613import java .io .IOException ;
714import java .net .InetAddress ;
815import java .util .Optional ;
@@ -16,7 +23,7 @@ public interface DatabaseProvider extends GeoIp2Provider {
1623 * @throws IOException if there is an IO error
1724 */
1825 Optional <CountryResponse > tryCountry (InetAddress ipAddress ) throws IOException ,
19- GeoIp2Exception ;
26+ GeoIp2Exception ;
2027
2128 /**
2229 * @param ipAddress IPv4 or IPv6 address to lookup.
@@ -25,7 +32,7 @@ Optional<CountryResponse> tryCountry(InetAddress ipAddress) throws IOException,
2532 * @throws IOException if there is an IO error
2633 */
2734 Optional <CityResponse > tryCity (InetAddress ipAddress ) throws IOException ,
28- GeoIp2Exception ;
35+ GeoIp2Exception ;
2936
3037 /**
3138 * Look up an IP address in a GeoIP2 Anonymous IP.
@@ -36,7 +43,7 @@ Optional<CityResponse> tryCity(InetAddress ipAddress) throws IOException,
3643 * @throws java.io.IOException if there is an IO error
3744 */
3845 AnonymousIpResponse anonymousIp (InetAddress ipAddress ) throws IOException ,
39- GeoIp2Exception ;
46+ GeoIp2Exception ;
4047
4148 /**
4249 * Look up an IP address in a GeoIP2 Anonymous IP.
@@ -47,10 +54,10 @@ AnonymousIpResponse anonymousIp(InetAddress ipAddress) throws IOException,
4754 * @throws java.io.IOException if there is an IO error
4855 */
4956 Optional <AnonymousIpResponse > tryAnonymousIp (InetAddress ipAddress ) throws IOException ,
50- GeoIp2Exception ;
57+ GeoIp2Exception ;
5158
5259
53- /**
60+ /**
5461 * Look up an IP address in a GeoIP2 IP Risk database.
5562 *
5663 * @param ipAddress IPv4 or IPv6 address to lookup.
@@ -59,18 +66,18 @@ Optional<AnonymousIpResponse> tryAnonymousIp(InetAddress ipAddress) throws IOExc
5966 * @throws java.io.IOException if there is an IO error
6067 */
6168 IpRiskResponse ipRisk (InetAddress ipAddress ) throws IOException ,
62- GeoIp2Exception ;
69+ GeoIp2Exception ;
6370
6471 /**
65- * Look up an IP address in a GeoIP2 IP Risk database.
66- *
67- * @param ipAddress IPv4 or IPv6 address to lookup.
68- * @return an IPRiskResponse for the requested IP address or empty if the IP address is not in the DB.
69- * @throws com.maxmind.geoip2.exception.GeoIp2Exception if there is an error looking up the IP
70- * @throws java.io.IOException if there is an IO error
71- */
72+ * Look up an IP address in a GeoIP2 IP Risk database.
73+ *
74+ * @param ipAddress IPv4 or IPv6 address to lookup.
75+ * @return an IPRiskResponse for the requested IP address or empty if the IP address is not in the DB.
76+ * @throws com.maxmind.geoip2.exception.GeoIp2Exception if there is an error looking up the IP
77+ * @throws java.io.IOException if there is an IO error
78+ */
7279 Optional <IpRiskResponse > tryIpRisk (InetAddress ipAddress ) throws IOException ,
73- GeoIp2Exception ;
80+ GeoIp2Exception ;
7481
7582 /**
7683 * Look up an IP address in a GeoLite2 ASN database.
@@ -81,7 +88,7 @@ Optional<IpRiskResponse> tryIpRisk(InetAddress ipAddress) throws IOException,
8188 * @throws java.io.IOException if there is an IO error
8289 */
8390 AsnResponse asn (InetAddress ipAddress ) throws IOException ,
84- GeoIp2Exception ;
91+ GeoIp2Exception ;
8592
8693 /**
8794 * Look up an IP address in a GeoLite2 ASN database.
@@ -92,7 +99,7 @@ AsnResponse asn(InetAddress ipAddress) throws IOException,
9299 * @throws java.io.IOException if there is an IO error
93100 */
94101 Optional <AsnResponse > tryAsn (InetAddress ipAddress ) throws IOException ,
95- GeoIp2Exception ;
102+ GeoIp2Exception ;
96103
97104 /**
98105 * Look up an IP address in a GeoIP2 Connection Type database.
@@ -103,7 +110,7 @@ Optional<AsnResponse> tryAsn(InetAddress ipAddress) throws IOException,
103110 * @throws java.io.IOException if there is an IO error
104111 */
105112 ConnectionTypeResponse connectionType (InetAddress ipAddress )
106- throws IOException , GeoIp2Exception ;
113+ throws IOException , GeoIp2Exception ;
107114
108115 /**
109116 * Look up an IP address in a GeoIP2 Connection Type database.
@@ -114,7 +121,7 @@ ConnectionTypeResponse connectionType(InetAddress ipAddress)
114121 * @throws java.io.IOException if there is an IO error
115122 */
116123 Optional <ConnectionTypeResponse > tryConnectionType (InetAddress ipAddress )
117- throws IOException , GeoIp2Exception ;
124+ throws IOException , GeoIp2Exception ;
118125
119126 /**
120127 * Look up an IP address in a GeoIP2 Domain database.
@@ -125,7 +132,7 @@ Optional<ConnectionTypeResponse> tryConnectionType(InetAddress ipAddress)
125132 * @throws java.io.IOException if there is an IO error
126133 */
127134 DomainResponse domain (InetAddress ipAddress ) throws IOException ,
128- GeoIp2Exception ;
135+ GeoIp2Exception ;
129136
130137 /**
131138 * Look up an IP address in a GeoIP2 Domain database.
@@ -136,7 +143,7 @@ DomainResponse domain(InetAddress ipAddress) throws IOException,
136143 * @throws java.io.IOException if there is an IO error
137144 */
138145 Optional <DomainResponse > tryDomain (InetAddress ipAddress ) throws IOException ,
139- GeoIp2Exception ;
146+ GeoIp2Exception ;
140147
141148 /**
142149 * Look up an IP address in a GeoIP2 Enterprise database.
@@ -147,7 +154,7 @@ Optional<DomainResponse> tryDomain(InetAddress ipAddress) throws IOException,
147154 * @throws java.io.IOException if there is an IO error
148155 */
149156 EnterpriseResponse enterprise (InetAddress ipAddress ) throws IOException ,
150- GeoIp2Exception ;
157+ GeoIp2Exception ;
151158
152159 /**
153160 * Look up an IP address in a GeoIP2 Enterprise database.
@@ -158,7 +165,7 @@ EnterpriseResponse enterprise(InetAddress ipAddress) throws IOException,
158165 * @throws java.io.IOException if there is an IO error
159166 */
160167 Optional <EnterpriseResponse > tryEnterprise (InetAddress ipAddress ) throws IOException ,
161- GeoIp2Exception ;
168+ GeoIp2Exception ;
162169
163170 /**
164171 * Look up an IP address in a GeoIP2 ISP database.
@@ -169,7 +176,7 @@ Optional<EnterpriseResponse> tryEnterprise(InetAddress ipAddress) throws IOExcep
169176 * @throws java.io.IOException if there is an IO error
170177 */
171178 IspResponse isp (InetAddress ipAddress ) throws IOException ,
172- GeoIp2Exception ;
179+ GeoIp2Exception ;
173180
174181 /**
175182 * Look up an IP address in a GeoIP2 ISP database.
@@ -180,5 +187,5 @@ IspResponse isp(InetAddress ipAddress) throws IOException,
180187 * @throws java.io.IOException if there is an IO error
181188 */
182189 Optional <IspResponse > tryIsp (InetAddress ipAddress ) throws IOException ,
183- GeoIp2Exception ;
190+ GeoIp2Exception ;
184191}
0 commit comments