public class ApacheHttpClientImpl extends Object implements HttpClient
| Modifier and Type | Field and Description |
|---|---|
protected ExecutorService |
executor |
| Constructor and Description |
|---|
ApacheHttpClientImpl(GoogleAnalyticsConfig config) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected ExecutorService |
createExecutor(GoogleAnalyticsConfig config) |
protected org.apache.http.impl.client.CloseableHttpClient |
createHttpClient(GoogleAnalyticsConfig config) |
protected List<org.apache.http.NameValuePair> |
createNameValuePairs(HttpRequest req) |
protected ThreadFactory |
createThreadFactory(GoogleAnalyticsConfig config) |
protected org.apache.http.client.methods.CloseableHttpResponse |
execute(String url,
org.apache.http.HttpEntity entity) |
boolean |
isBatchSupported() |
java8.util.concurrent.CompletableFuture<HttpResponse> |
post(HttpRequest req) |
java8.util.concurrent.CompletableFuture<HttpBatchResponse> |
postBatch(HttpBatchRequest req) |
protected final ExecutorService executor
public ApacheHttpClientImpl(GoogleAnalyticsConfig config)
public void close()
close in interface AutoCloseableprotected org.apache.http.impl.client.CloseableHttpClient createHttpClient(GoogleAnalyticsConfig config)
public boolean isBatchSupported()
isBatchSupported in interface HttpClientprotected org.apache.http.client.methods.CloseableHttpResponse execute(String url, org.apache.http.HttpEntity entity) throws org.apache.http.client.ClientProtocolException, IOException
org.apache.http.client.ClientProtocolExceptionIOExceptionprotected List<org.apache.http.NameValuePair> createNameValuePairs(HttpRequest req)
public java8.util.concurrent.CompletableFuture<HttpResponse> post(HttpRequest req)
post in interface HttpClientpublic java8.util.concurrent.CompletableFuture<HttpBatchResponse> postBatch(HttpBatchRequest req)
postBatch in interface HttpClientprotected ExecutorService createExecutor(GoogleAnalyticsConfig config)
protected ThreadFactory createThreadFactory(GoogleAnalyticsConfig config)
Copyright © Sep 2013–2018 Mike Hardy. All rights reserved.