1414import com .maxmind .minfraud .response .FactorsResponse ;
1515import com .maxmind .minfraud .response .InsightsResponse ;
1616import com .maxmind .minfraud .response .ScoreResponse ;
17- import java .io .Closeable ;
1817import java .io .IOException ;
1918import java .io .InputStream ;
20- import java .net .InetSocketAddress ;
21- import java .net .Proxy ;
2219import java .net .ProxySelector ;
2320import java .net .URI ;
2421import java .net .URISyntaxException ;
3734/**
3835 * Client for MaxMind minFraud Score, Insights, and Factors
3936 */
40- public final class WebServiceClient implements Closeable {
37+ public final class WebServiceClient {
4138 private static final String pathBase = "/minfraud/v2.0/" ;
4239 private static final String userAgent = "minFraud-API/"
4340 + WebServiceClient .class .getPackage ().getImplementationVersion ()
@@ -118,17 +115,6 @@ public Builder(int accountId, String licenseKey) {
118115 this .licenseKey = licenseKey ;
119116 }
120117
121- /**
122- * @param val Timeout in milliseconds to establish a connection to the
123- * web service. There is no timeout by default.
124- * @return Builder object
125- * @deprecated Use connectTimeout(Duration) instead
126- */
127- @ Deprecated
128- public WebServiceClient .Builder connectTimeout (int val ) {
129- return connectTimeout (Duration .ofMillis (val ));
130- }
131-
132118 /**
133119 * @param val Timeout duration to establish a connection to the web
134120 * service. There is no timeout by default.
@@ -181,17 +167,6 @@ public WebServiceClient.Builder locales(List<String> val) {
181167 return this ;
182168 }
183169
184- /**
185- * @param val readTimeout in milliseconds to read data from an
186- * established connection to the web service. There is no
187- * timeout by default.
188- * @return Builder object
189- * @deprecated Use requestTimeout(Duration) instead
190- */
191- @ Deprecated
192- public WebServiceClient .Builder readTimeout (int val ) {
193- return requestTimeout (Duration .ofMillis (val ));
194- }
195170
196171 /**
197172 * @param val Request timeout duration. here is no timeout by default.
@@ -202,18 +177,6 @@ public Builder requestTimeout(Duration val) {
202177 return this ;
203178 }
204179
205- /**
206- * @param val the proxy to use when making this request.
207- * @return Builder object
208- * @deprecated Use proxy(ProxySelector)
209- */
210- @ Deprecated
211- public Builder proxy (Proxy val ) {
212- if (val != null && val != Proxy .NO_PROXY ) {
213- proxy = ProxySelector .of ((InetSocketAddress ) val .address ());
214- }
215- return this ;
216- }
217180
218181 /**
219182 * @param val the proxy to use when making this request.
@@ -507,14 +470,6 @@ private void exhaustBody(HttpResponse<InputStream> response) throws HttpExceptio
507470 }
508471 }
509472
510- /**
511- * @deprecated Closing is no longer necessary with java.net.http.HttpClient.
512- */
513- @ Override
514- @ Deprecated
515- public void close () throws IOException {
516- }
517-
518473 @ Override
519474 public String toString () {
520475 return "WebServiceClient{"
0 commit comments