public class HttpClientConnection extends Object implements FutureConnection
| Modifier and Type | Class and Description |
|---|---|
static class |
HttpClientConnection.Provider |
| Constructor and Description |
|---|
HttpClientConnection() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected static org.apache.http.impl.client.CloseableHttpClient |
createClient() |
protected static org.apache.http.impl.client.CloseableHttpClient |
createClientWithProxy(String proxyStr) |
protected ExecutorService |
createExecutorService() |
<T> T |
execute(Request<T> request,
Map<String,String> exraHeaders,
String key) |
<T> T |
execute(Request<T> request,
String key) |
<T> Future<T> |
executeAsync(Request<T> request,
Map<String,String> exraHeaders,
String apiKey) |
<T> Future<T> |
executeAsync(Request<T> request,
String apiKey) |
protected Map<String,String> |
toJavaMap(org.apache.http.Header[] headers) |
public <T> Future<T> executeAsync(Request<T> request, String apiKey)
executeAsync in interface AsyncConnection<Future<?>>executeAsync in interface FutureConnectionpublic <T> Future<T> executeAsync(Request<T> request, Map<String,String> exraHeaders, String apiKey)
executeAsync in interface AsyncConnection<Future<?>>executeAsync in interface FutureConnectionpublic <T> T execute(Request<T> request, String key)
execute in interface Connectionexecute in interface FutureConnectionpublic <T> T execute(Request<T> request, Map<String,String> exraHeaders, String key)
execute in interface Connectionexecute in interface FutureConnectionprotected ExecutorService createExecutorService()
protected static org.apache.http.impl.client.CloseableHttpClient createClientWithProxy(String proxyStr) throws URISyntaxException
URISyntaxExceptionprotected static org.apache.http.impl.client.CloseableHttpClient createClient()
public void close()
close in interface ConnectionCopyright © 2018. All rights reserved.