List of usage examples for org.apache.http.impl.nio.client MinimalClientExchangeHandlerImpl start
public void start() throws HttpException, IOException
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();//w w w. j ava 2 s .c om 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; }