List of usage examples for org.apache.http.impl.nio.client MinimalClientExchangeHandlerImpl MinimalClientExchangeHandlerImpl
public MinimalClientExchangeHandlerImpl(final Log log, final HttpAsyncRequestProducer requestProducer, final HttpAsyncResponseConsumer<T> responseConsumer, final HttpClientContext localContext, final BasicFuture<T> resultFuture, final NHttpClientConnectionManager connmgr, final HttpProcessor httpProcessor, final ConnectionReuseStrategy connReuseStrategy, final ConnectionKeepAliveStrategy keepaliveStrategy)
From source file:org.apache.http.impl.nio.client.MinimalHttpAsyncClient.java
@Override public <T> Future<T> execute(final HttpAsyncRequestProducer requestProducer, final HttpAsyncResponseConsumer<T> responseConsumer, final HttpContext context, final FutureCallback<T> callback) { ensureRunning();//from ww w. j av a 2 s . co m final BasicFuture<T> future = new BasicFuture<T>(callback); final HttpClientContext localcontext = HttpClientContext .adapt(context != null ? context : new BasicHttpContext()); @SuppressWarnings("resource") final MinimalClientExchangeHandlerImpl<T> handler = new MinimalClientExchangeHandlerImpl<T>(this.log, requestProducer, responseConsumer, localcontext, future, this.connmgr, this.httpProcessor, this.connReuseStrategy, this.keepaliveStrategy); try { handler.start(); } catch (final Exception ex) { handler.failed(ex); } return future; }