java.lang.Object
com.maxmind.minfraud.WebServiceClient.Builder
- Enclosing class:
- WebServiceClient
Builder
creates instances of WebServiceClient
from values set by the
methods.
This example shows how to create a WebServiceClient
object with the Builder
:
WebServiceClient client = new WebServiceClient.Builder(12,"licensekey").host ("geoip.maxmind.com").build();
Only the values set in the Builder
constructor are required.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
connectTimeout
(Duration val) Disables HTTPS to connect to a test server or proxy.port
(int val) proxy
(ProxySelector val) requestTimeout
(Duration val)
-
Constructor Details
-
Builder
- Parameters:
accountId
- Your MaxMind account ID.licenseKey
- Your MaxMind license key.
-
-
Method Details
-
connectTimeout
- Parameters:
val
- Timeout duration to establish a connection to the web service. There is no timeout by default.- Returns:
- Builder object
-
disableHttps
Disables HTTPS to connect to a test server or proxy. The minFraud ScoreResponse and InsightsResponse web services require HTTPS.- Returns:
- Builder object
-
host
- Parameters:
val
- The host to use. By default, the client connects to the production host. However, during testing and development, you can set this option to 'sandbox.maxmind.com' to use the Sandbox environment's host. The sandbox allows you to experiment with the API without affecting your production data.- Returns:
- Builder object
-
port
- Parameters:
val
- The port to use.- Returns:
- Builder object
-
locales
- Parameters:
val
- List of locale codes to use in name property from most preferred to least preferred.- Returns:
- Builder object
-
requestTimeout
- Parameters:
val
- Request timeout duration. here is no timeout by default.- Returns:
- Builder object
-
proxy
- Parameters:
val
- the proxy to use when making this request.- Returns:
- Builder object
-
build
- Returns:
- an instance of
WebServiceClient
created from the fields set on this builder.
-