Class SingleHostHttpClientProvider
- java.lang.Object
-
- com.github.nhenneaux.resilienthttpclient.singlehostclient.SingleHostHttpClientProvider
-
public class SingleHostHttpClientProvider extends Object
Create anHttpClientto target a single host. It validates the certificate to authenticate the server in TLS communication with this single name. It can be used to target a single host using its IP address(es) instead of its hostname while keeping a high protection against Man-in-the-middle attack.
-
-
Constructor Summary
Constructors Constructor Description SingleHostHttpClientProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpClientbuildSingleHostnameHttpClient(String hostname)HttpClientbuildSingleHostnameHttpClient(String hostname, KeyStore trustStore)HttpClientbuildSingleHostnameHttpClient(String hostname, KeyStore trustStore, HttpClient.Builder builder)
-
-
-
Method Detail
-
buildSingleHostnameHttpClient
public HttpClient buildSingleHostnameHttpClient(String hostname)
-
buildSingleHostnameHttpClient
public HttpClient buildSingleHostnameHttpClient(String hostname, KeyStore trustStore)
-
buildSingleHostnameHttpClient
public HttpClient buildSingleHostnameHttpClient(String hostname, KeyStore trustStore, HttpClient.Builder builder)
-
-