Example usage for org.apache.http.impl.nio.client InternalRequestExecutor InternalRequestExecutor

List of usage examples for org.apache.http.impl.nio.client InternalRequestExecutor InternalRequestExecutor

Introduction

In this page you can find the example usage for org.apache.http.impl.nio.client InternalRequestExecutor InternalRequestExecutor.

Prototype

public InternalRequestExecutor(final Log log, final NHttpClientEventHandler handler) 

Source Link

Usage

From source file:org.apache.http.impl.nio.client.AbstractHttpAsyncClient.java

private void doExecute() {
    final InternalRequestExecutor handler = new InternalRequestExecutor(this.log,
            new HttpAsyncRequestExecutor());
    try {/*ww  w  . ja  v a  2s . c  o  m*/
        final IOEventDispatch ioEventDispatch = new DefaultHttpClientIODispatch(handler, getParams());
        this.connmgr.execute(ioEventDispatch);
    } catch (final Exception ex) {
        this.log.error("I/O reactor terminated abnormally", ex);
    } finally {
        this.terminated = true;
        while (!this.queue.isEmpty()) {
            final HttpAsyncRequestExecutionHandler<?> exchangeHandler = this.queue.remove();
            exchangeHandler.cancel();
        }
    }
}

From source file:org.apache.http.impl.nio.client.InternalIODispatch.java

public InternalIODispatch(final NHttpClientEventHandler handler) {
    super();//from  ww  w . j  a va2  s  .  c  o m
    if (this.log.isDebugEnabled()) {
        this.handler = new InternalRequestExecutor(this.log, handler);
    } else {
        this.handler = handler;
    }
}