public class CachingHttpClientFactory extends DefaultHttpClientFactory
HttpClientFactory that caches created clients
until the close() method is called.| Constructor and Description |
|---|
CachingHttpClientFactory() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close all HTTP clients created by this factory
|
de.undercouch.gradle.tasks.download.org.apache.http.impl.client.CloseableHttpClient |
createHttpClient(de.undercouch.gradle.tasks.download.org.apache.http.HttpHost httpHost,
boolean acceptAnyCertificate,
int retries)
Creates an HTTP client for the given host
|
public de.undercouch.gradle.tasks.download.org.apache.http.impl.client.CloseableHttpClient createHttpClient(de.undercouch.gradle.tasks.download.org.apache.http.HttpHost httpHost,
boolean acceptAnyCertificate,
int retries)
HttpClientFactorycreateHttpClient in interface HttpClientFactorycreateHttpClient in class DefaultHttpClientFactoryhttpHost - the host to connect toacceptAnyCertificate - true if HTTPS certificate verification
errors should be ignored and any certificate (even an invalid one)
should be acceptedretries - the number of retries to perform if an HTTP request failspublic void close()
throws java.io.IOException
java.io.IOException - if an I/O error occurs