Java 类org.apache.http.conn.ClientConnectionRequest 实例源码

项目:lams    文件:BasicClientConnectionManager.java   
public final ClientConnectionRequest requestConnection(
        final HttpRoute route,
        final Object state) {

    return new ClientConnectionRequest() {

        public void abortRequest() {
            // Nothing to abort, since requests are immediate.
        }

        public ManagedClientConnection getConnection(
                long timeout, TimeUnit tunit) {
            return BasicClientConnectionManager.this.getConnection(
                    route, state);
        }

    };
}
项目:lams    文件:SingleClientConnManager.java   
public final ClientConnectionRequest requestConnection(
        final HttpRoute route,
        final Object state) {

    return new ClientConnectionRequest() {

        public void abortRequest() {
            // Nothing to abort, since requests are immediate.
        }

        public ManagedClientConnection getConnection(
                long timeout, TimeUnit tunit) {
            return SingleClientConnManager.this.getConnection(
                    route, state);
        }

    };
}
项目:lams    文件:PoolingClientConnectionManager.java   
public ClientConnectionRequest requestConnection(
        final HttpRoute route,
        final Object state) {
    if (route == null) {
        throw new IllegalArgumentException("HTTP route may not be null");
    }
    if (this.log.isDebugEnabled()) {
        this.log.debug("Connection request: " + format(route, state) + formatStats(route));
    }
    final Future<HttpPoolEntry> future = this.pool.lease(route, state);

    return new ClientConnectionRequest() {

        public void abortRequest() {
            future.cancel(true);
        }

        public ManagedClientConnection getConnection(
                final long timeout,
                final TimeUnit tunit) throws InterruptedException, ConnectionPoolTimeoutException {
            return leaseConnection(future, timeout, tunit);
        }

    };

}
项目:cloud-meter    文件:JMeterPoolingClientConnectionManager.java   
@Override
public ClientConnectionRequest requestConnection(
        final HttpRoute route,
        final Object state) {
    Args.notNull(route, "HTTP route");
    if (this.log.isDebugEnabled()) {
        this.log.debug("Connection request: " + format(route, state) + formatStats(route));
    }
    final Future<HttpPoolEntry> future = this.pool.lease(route, state);

    return new ClientConnectionRequest() {
        @Override
        public void abortRequest() {
            future.cancel(true);
        }
        @Override
        public ManagedClientConnection getConnection(
                final long timeout,
                final TimeUnit tunit) throws InterruptedException, ConnectionPoolTimeoutException {
            return leaseConnection(future, timeout, tunit);
        }

    };

}
项目:purecloud-iot    文件:BasicClientConnectionManager.java   
@Override
public final ClientConnectionRequest requestConnection(
        final HttpRoute route,
        final Object state) {

    return new ClientConnectionRequest() {

        @Override
        public void abortRequest() {
            // Nothing to abort, since requests are immediate.
        }

        @Override
        public ManagedClientConnection getConnection(
                final long timeout, final TimeUnit tunit) {
            return BasicClientConnectionManager.this.getConnection(
                    route, state);
        }

    };
}
项目:purecloud-iot    文件:SingleClientConnManager.java   
@Override
public final ClientConnectionRequest requestConnection(
        final HttpRoute route,
        final Object state) {

    return new ClientConnectionRequest() {

        @Override
        public void abortRequest() {
            // Nothing to abort, since requests are immediate.
        }

        @Override
        public ManagedClientConnection getConnection(
                final long timeout, final TimeUnit tunit) {
            return SingleClientConnManager.this.getConnection(
                    route, state);
        }

    };
}
项目:FMTech    文件:ElegantThreadSafeConnManager.java   
public final ClientConnectionRequest requestConnection(final HttpRoute paramHttpRoute, Object paramObject)
{
  new ClientConnectionRequest()
  {
    public final void abortRequest()
    {
      this.val$poolRequest.abortRequest();
    }

    public final ManagedClientConnection getConnection(long paramAnonymousLong, TimeUnit paramAnonymousTimeUnit)
      throws InterruptedException, ConnectionPoolTimeoutException
    {
      if (paramHttpRoute == null) {
        throw new IllegalArgumentException("Route may not be null.");
      }
      BasicPoolEntry localBasicPoolEntry = this.val$poolRequest.getPoolEntry(paramAnonymousLong, paramAnonymousTimeUnit);
      return new ElegantThreadSafeConnManager.ElegantBasicPooledConnAdapter(ElegantThreadSafeConnManager.this, localBasicPoolEntry);
    }
  };
}
项目:cJUnit-mc626    文件:SingleClientConnManager.java   
public final ClientConnectionRequest requestConnection(
        final HttpRoute route,
        final Object state) {

    return new ClientConnectionRequest() {

        public void abortRequest() {
            // Nothing to abort, since requests are immediate.
        }

        public ManagedClientConnection getConnection(
                long timeout, TimeUnit tunit) {
            return SingleClientConnManager.this.getConnection(
                    route, state);
        }

    };
}
项目:Open-DM    文件:HCAPAdapter.java   
public ClientConnectionRequest requestConnection(HttpRoute route, Object state) {
    if (count > MAX_COUNT) {
        LOG.log(Level.INFO, "****Getting connection in pool.  Current total max = "
                + getConnectionsInPool()
                + "   Current for route = " + getConnectionsInPool(route) + "  Route = "
                + route.getTargetHost());
        count = 0;
    }
    ++count;
    return super.requestConnection(route, state);
}
项目:lams    文件:HttpRequestBase.java   
public void setConnectionRequest(final ClientConnectionRequest connRequest)
        throws IOException {
    if (this.aborted) {
        throw new IOException("Request already aborted");
    }
    this.abortLock.lock();
    try {
        this.connRequest = connRequest;
    } finally {
        this.abortLock.unlock();
    }
}
项目:lams    文件:ThreadSafeClientConnManager.java   
public ClientConnectionRequest requestConnection(
        final HttpRoute route,
        final Object state) {

    final PoolEntryRequest poolRequest = pool.requestPoolEntry(
            route, state);

    return new ClientConnectionRequest() {

        public void abortRequest() {
            poolRequest.abortRequest();
        }

        public ManagedClientConnection getConnection(
                long timeout, TimeUnit tunit) throws InterruptedException,
                ConnectionPoolTimeoutException {
            if (route == null) {
                throw new IllegalArgumentException("Route may not be null.");
            }

            if (log.isDebugEnabled()) {
                log.debug("Get connection: " + route + ", timeout = " + timeout);
            }

            BasicPoolEntry entry = poolRequest.getPoolEntry(timeout, tunit);
            return new BasicPooledConnAdapter(ThreadSafeClientConnManager.this, entry);
        }

    };

}
项目:remote-files-sync    文件:AbstractExecutionAwareRequest.java   
@Deprecated
public void setConnectionRequest(final ClientConnectionRequest connRequest) {
    setCancellable(new Cancellable() {

        public boolean cancel() {
            connRequest.abortRequest();
            return true;
        }

    });
}
项目:remote-files-sync    文件:MinimalHttpClient.java   
public ClientConnectionManager getConnectionManager() {

        return new ClientConnectionManager() {

            public void shutdown() {
                connManager.shutdown();
            }

            public ClientConnectionRequest requestConnection(
                    final HttpRoute route, final Object state) {
                throw new UnsupportedOperationException();
            }

            public void releaseConnection(
                    final ManagedClientConnection conn,
                    final long validDuration, final TimeUnit timeUnit) {
                throw new UnsupportedOperationException();
            }

            public SchemeRegistry getSchemeRegistry() {
                throw new UnsupportedOperationException();
            }

            public void closeIdleConnections(final long idletime, final TimeUnit tunit) {
                connManager.closeIdleConnections(idletime, tunit);
            }

            public void closeExpiredConnections() {
                connManager.closeExpiredConnections();
            }

        };

    }
项目:remote-files-sync    文件:InternalHttpClient.java   
public ClientConnectionManager getConnectionManager() {

        return new ClientConnectionManager() {

            public void shutdown() {
                connManager.shutdown();
            }

            public ClientConnectionRequest requestConnection(
                    final HttpRoute route, final Object state) {
                throw new UnsupportedOperationException();
            }

            public void releaseConnection(
                    final ManagedClientConnection conn,
                    final long validDuration, final TimeUnit timeUnit) {
                throw new UnsupportedOperationException();
            }

            public SchemeRegistry getSchemeRegistry() {
                throw new UnsupportedOperationException();
            }

            public void closeIdleConnections(final long idletime, final TimeUnit tunit) {
                connManager.closeIdleConnections(idletime, tunit);
            }

            public void closeExpiredConnections() {
                connManager.closeExpiredConnections();
            }

        };

    }
项目:sinacloud-sdk-java    文件:ClientConnectionRequestFactory.java   
/**
 * Returns a wrapped instance of {@link ClientConnectionRequest}
 * to capture the necessary performance metrics.
 * @param orig the target instance to be wrapped
 */
static ClientConnectionRequest wrap(ClientConnectionRequest orig) {
    if (orig instanceof Wrapped)
        throw new IllegalArgumentException();
    return (ClientConnectionRequest) Proxy.newProxyInstance(
            // https://github.com/aws/aws-sdk-java/pull/48#issuecomment-29454423
            ClientConnectionRequestFactory.class.getClassLoader(),
            interfaces,
            new Handler(orig));
}
项目:sinacloud-sdk-java    文件:ClientConnectionManagerFactory.java   
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
    try {
        Object ret = method.invoke(orig, args);
        return ret instanceof ClientConnectionRequest
             ? ClientConnectionRequestFactory.wrap((ClientConnectionRequest) ret)
             : ret
             ;
    } catch (InvocationTargetException e) {
        log.debug("", e);
        throw e.getCause();
    }
}
项目:purecloud-iot    文件:PoolingClientConnectionManager.java   
@Override
public ClientConnectionRequest requestConnection(
        final HttpRoute route,
        final Object state) {
    Args.notNull(route, "HTTP route");
    if (this.log.isDebugEnabled()) {
        this.log.debug("Connection request: " + format(route, state) + formatStats(route));
    }
    final Future<HttpPoolEntry> future = this.pool.lease(route, state);

    return new ClientConnectionRequest() {

        @Override
        public void abortRequest() {
            future.cancel(true);
        }

        @Override
        public ManagedClientConnection getConnection(
                final long timeout,
                final TimeUnit tunit) throws InterruptedException, ConnectionPoolTimeoutException {
            return leaseConnection(future, timeout, tunit);
        }

    };

}
项目:purecloud-iot    文件:ThreadSafeClientConnManager.java   
@Override
public ClientConnectionRequest requestConnection(
        final HttpRoute route,
        final Object state) {

    final PoolEntryRequest poolRequest = pool.requestPoolEntry(
            route, state);

    return new ClientConnectionRequest() {

        @Override
        public void abortRequest() {
            poolRequest.abortRequest();
        }

        @Override
        public ManagedClientConnection getConnection(
                final long timeout, final TimeUnit tunit) throws InterruptedException,
                ConnectionPoolTimeoutException {
            Args.notNull(route, "Route");

            if (log.isDebugEnabled()) {
                log.debug("Get connection: " + route + ", timeout = " + timeout);
            }

            final BasicPoolEntry entry = poolRequest.getPoolEntry(timeout, tunit);
            return new BasicPooledConnAdapter(ThreadSafeClientConnManager.this, entry);
        }

    };

}
项目:purecloud-iot    文件:AbstractExecutionAwareRequest.java   
@Override
@Deprecated
public void setConnectionRequest(final ClientConnectionRequest connRequest) {
    setCancellable(new Cancellable() {

        @Override
        public boolean cancel() {
            connRequest.abortRequest();
            return true;
        }

    });
}
项目:Visit    文件:AbstractExecutionAwareRequest.java   
@Deprecated
public void setConnectionRequest(final ClientConnectionRequest connRequest) {
    setCancellable(new Cancellable() {

        public boolean cancel() {
            connRequest.abortRequest();
            return true;
        }

    });
}
项目:Visit    文件:MinimalHttpClient.java   
public ClientConnectionManager getConnectionManager() {

        return new ClientConnectionManager() {

            public void shutdown() {
                connManager.shutdown();
            }

            public ClientConnectionRequest requestConnection(
                    final HttpRoute route, final Object state) {
                throw new UnsupportedOperationException();
            }

            public void releaseConnection(
                    final ManagedClientConnection conn,
                    final long validDuration, final TimeUnit timeUnit) {
                throw new UnsupportedOperationException();
            }

            public SchemeRegistry getSchemeRegistry() {
                throw new UnsupportedOperationException();
            }

            public void closeIdleConnections(final long idletime, final TimeUnit tunit) {
                connManager.closeIdleConnections(idletime, tunit);
            }

            public void closeExpiredConnections() {
                connManager.closeExpiredConnections();
            }

        };

    }
项目:Visit    文件:InternalHttpClient.java   
public ClientConnectionManager getConnectionManager() {

        return new ClientConnectionManager() {

            public void shutdown() {
                connManager.shutdown();
            }

            public ClientConnectionRequest requestConnection(
                    final HttpRoute route, final Object state) {
                throw new UnsupportedOperationException();
            }

            public void releaseConnection(
                    final ManagedClientConnection conn,
                    final long validDuration, final TimeUnit timeUnit) {
                throw new UnsupportedOperationException();
            }

            public SchemeRegistry getSchemeRegistry() {
                throw new UnsupportedOperationException();
            }

            public void closeIdleConnections(final long idletime, final TimeUnit tunit) {
                connManager.closeIdleConnections(idletime, tunit);
            }

            public void closeExpiredConnections() {
                connManager.closeExpiredConnections();
            }

        };

    }
项目:cJUnit-mc626    文件:HttpRequestBase.java   
public void setConnectionRequest(final ClientConnectionRequest connRequest)
        throws IOException {
    this.abortLock.lock();
    try {
        if (this.aborted) {
            throw new IOException("Request already aborted");
        }

        this.releaseTrigger = null;
        this.connRequest = connRequest;
    } finally {
        this.abortLock.unlock();
    }
}
项目:cJUnit-mc626    文件:HttpRequestBase.java   
public void abort() {
    ClientConnectionRequest localRequest;
    ConnectionReleaseTrigger localTrigger;

    this.abortLock.lock();
    try {
        if (this.aborted) {
            return;
        }            
        this.aborted = true;

        localRequest = connRequest;
        localTrigger = releaseTrigger;
    } finally {
        this.abortLock.unlock();
    }        

    // Trigger the callbacks outside of the lock, to prevent
    // deadlocks in the scenario where the callbacks have
    // their own locks that may be used while calling
    // setReleaseTrigger or setConnectionRequest.
    if (localRequest != null) {
        localRequest.abortRequest();
    }
    if (localTrigger != null) {
        try {
            localTrigger.abortConnection();
        } catch (IOException ex) {
            // ignore
        }
    }
}
项目:cJUnit-mc626    文件:ThreadSafeClientConnManager.java   
public ClientConnectionRequest requestConnection(
        final HttpRoute route, 
        final Object state) {

    final PoolEntryRequest poolRequest = connectionPool.requestPoolEntry(
            route, state);

    return new ClientConnectionRequest() {

        public void abortRequest() {
            poolRequest.abortRequest();
        }

        public ManagedClientConnection getConnection(
                long timeout, TimeUnit tunit) throws InterruptedException,
                ConnectionPoolTimeoutException {
            if (route == null) {
                throw new IllegalArgumentException("Route may not be null.");
            }

            if (log.isDebugEnabled()) {
                log.debug("Get connection: " + route + ", timeout = " + timeout);
            }

            BasicPoolEntry entry = poolRequest.getPoolEntry(timeout, tunit);
            return new BasicPooledConnAdapter(ThreadSafeClientConnManager.this, entry);
        }

    };

}
项目:ZTLib    文件:AbstractExecutionAwareRequest.java   
@Deprecated
public void setConnectionRequest(final ClientConnectionRequest connRequest) {
    setCancellable(new Cancellable() {

        public boolean cancel() {
            connRequest.abortRequest();
            return true;
        }

    });
}
项目:ZTLib    文件:MinimalHttpClient.java   
public ClientConnectionManager getConnectionManager() {

        return new ClientConnectionManager() {

            public void shutdown() {
                connManager.shutdown();
            }

            public ClientConnectionRequest requestConnection(
                    final HttpRoute route, final Object state) {
                throw new UnsupportedOperationException();
            }

            public void releaseConnection(
                    final ManagedClientConnection conn,
                    final long validDuration, final TimeUnit timeUnit) {
                throw new UnsupportedOperationException();
            }

            public SchemeRegistry getSchemeRegistry() {
                throw new UnsupportedOperationException();
            }

            public void closeIdleConnections(final long idletime, final TimeUnit tunit) {
                connManager.closeIdleConnections(idletime, tunit);
            }

            public void closeExpiredConnections() {
                connManager.closeExpiredConnections();
            }

        };

    }
项目:ZTLib    文件:InternalHttpClient.java   
public ClientConnectionManager getConnectionManager() {

        return new ClientConnectionManager() {

            public void shutdown() {
                connManager.shutdown();
            }

            public ClientConnectionRequest requestConnection(
                    final HttpRoute route, final Object state) {
                throw new UnsupportedOperationException();
            }

            public void releaseConnection(
                    final ManagedClientConnection conn,
                    final long validDuration, final TimeUnit timeUnit) {
                throw new UnsupportedOperationException();
            }

            public SchemeRegistry getSchemeRegistry() {
                throw new UnsupportedOperationException();
            }

            public void closeIdleConnections(final long idletime, final TimeUnit tunit) {
                connManager.closeIdleConnections(idletime, tunit);
            }

            public void closeExpiredConnections() {
                connManager.closeExpiredConnections();
            }

        };

    }
项目:PhET    文件:ManagerConnectDirect.java   
/**
 * Main entry point to this example.
 *
 * @param args      ignored
 */
public final static void main(String[] args)
    throws Exception {

    final HttpHost target = new HttpHost("jakarta.apache.org", 80, "http");

    setup(); // some general setup

    ClientConnectionManager clcm = createManager();

    HttpRequest req = createRequest(target);
    HttpContext ctx = createContext();

    System.out.println("preparing route to " + target);
    HttpRoute route = new HttpRoute
        (target, null, supportedSchemes.getScheme(target).isLayered());

    System.out.println("requesting connection for " + route);
    ClientConnectionRequest connRequest = clcm.requestConnection(route, null);
    ManagedClientConnection conn = connRequest.getConnection(0, null);
    try {
        System.out.println("opening connection");
        conn.open(route, ctx, getParams());

        System.out.println("sending request");
        conn.sendRequestHeader(req);
        // there is no request entity
        conn.flush();

        System.out.println("receiving response header");
        HttpResponse rsp = conn.receiveResponseHeader();

        System.out.println("----------------------------------------");
        System.out.println(rsp.getStatusLine());
        Header[] headers = rsp.getAllHeaders();
        for (int i=0; i<headers.length; i++) {
            System.out.println(headers[i]);
        }
        System.out.println("----------------------------------------");

        System.out.println("closing connection");
        conn.close();

    } finally {

        if (conn.isOpen()) {
            System.out.println("shutting down connection");
            try {
                conn.shutdown();
            } catch (Exception x) {
                System.out.println("problem during shutdown");
                x.printStackTrace(System.out);
            }
        }

        System.out.println("releasing connection");
        clcm.releaseConnection(conn, -1, null);
    }

}
项目:sinacloud-sdk-java    文件:ClientConnectionRequestFactory.java   
Handler(ClientConnectionRequest orig) {
    this.orig = orig;
}
项目:cloud-meter    文件:MeasuringConnectionManager.java   
@Override
public ClientConnectionRequest requestConnection(final HttpRoute route, final Object state) {
    ClientConnectionRequest res = super.requestConnection(route, state);
    return new MeasuringConnectionRequest(res);
}
项目:cloud-meter    文件:MeasuringConnectionManager.java   
public MeasuringConnectionRequest(ClientConnectionRequest res) {
    handler = res;
}
项目:purecloud-iot    文件:MinimalHttpClient.java   
@Override
public ClientConnectionManager getConnectionManager() {

    return new ClientConnectionManager() {

        @Override
        public void shutdown() {
            connManager.shutdown();
        }

        @Override
        public ClientConnectionRequest requestConnection(
                final HttpRoute route, final Object state) {
            throw new UnsupportedOperationException();
        }

        @Override
        public void releaseConnection(
                final ManagedClientConnection conn,
                final long validDuration, final TimeUnit timeUnit) {
            throw new UnsupportedOperationException();
        }

        @Override
        public SchemeRegistry getSchemeRegistry() {
            throw new UnsupportedOperationException();
        }

        @Override
        public void closeIdleConnections(final long idletime, final TimeUnit tunit) {
            connManager.closeIdleConnections(idletime, tunit);
        }

        @Override
        public void closeExpiredConnections() {
            connManager.closeExpiredConnections();
        }

    };

}
项目:purecloud-iot    文件:InternalHttpClient.java   
@Override
public ClientConnectionManager getConnectionManager() {

    return new ClientConnectionManager() {

        @Override
        public void shutdown() {
            connManager.shutdown();
        }

        @Override
        public ClientConnectionRequest requestConnection(
                final HttpRoute route, final Object state) {
            throw new UnsupportedOperationException();
        }

        @Override
        public void releaseConnection(
                final ManagedClientConnection conn,
                final long validDuration, final TimeUnit timeUnit) {
            throw new UnsupportedOperationException();
        }

        @Override
        public SchemeRegistry getSchemeRegistry() {
            throw new UnsupportedOperationException();
        }

        @Override
        public void closeIdleConnections(final long idletime, final TimeUnit tunit) {
            connManager.closeIdleConnections(idletime, tunit);
        }

        @Override
        public void closeExpiredConnections() {
            connManager.closeExpiredConnections();
        }

    };

}
项目:FMTech    文件:jsj.java   
public final ClientConnectionRequest requestConnection(HttpRoute paramHttpRoute, Object paramObject)
{
  return new jsk(this, super.requestConnection(paramHttpRoute, paramObject));
}
项目:cJUnit-mc626    文件:ManagerConnectDirect.java   
/**
 * Main entry point to this example.
 *
 * @param args      ignored
 */
public final static void main(String[] args)
    throws Exception {

    final HttpHost target = new HttpHost("jakarta.apache.org", 80, "http");

    setup(); // some general setup

    ClientConnectionManager clcm = createManager();

    HttpRequest req = createRequest(target);
    HttpContext ctx = createContext();

    System.out.println("preparing route to " + target);
    HttpRoute route = new HttpRoute
        (target, null, supportedSchemes.getScheme(target).isLayered());

    System.out.println("requesting connection for " + route);
    ClientConnectionRequest connRequest = clcm.requestConnection(route, null);
    ManagedClientConnection conn = connRequest.getConnection(0, null);
    try {
        System.out.println("opening connection");
        conn.open(route, ctx, getParams());

        System.out.println("sending request");
        conn.sendRequestHeader(req);
        // there is no request entity
        conn.flush();

        System.out.println("receiving response header");
        HttpResponse rsp = conn.receiveResponseHeader();

        System.out.println("----------------------------------------");
        System.out.println(rsp.getStatusLine());
        Header[] headers = rsp.getAllHeaders();
        for (int i=0; i<headers.length; i++) {
            System.out.println(headers[i]);
        }
        System.out.println("----------------------------------------");

        System.out.println("closing connection");
        conn.close();

    } finally {

        if (conn.isOpen()) {
            System.out.println("shutting down connection");
            try {
                conn.shutdown();
            } catch (Exception x) {
                System.out.println("problem during shutdown");
                x.printStackTrace(System.out);
            }
        }

        System.out.println("releasing connection");
        clcm.releaseConnection(conn, -1, null);
    }

}
项目:ribbon    文件:MonitoredConnectionManager.java   
@Override
public ClientConnectionRequest requestConnection(HttpRoute route,
        Object state) {
    // TODO Auto-generated method stub
    return super.requestConnection(route, state);
}
项目:dropbox-java-sdk    文件:AbstractSession.java   
@Override
public ClientConnectionRequest requestConnection(HttpRoute route,
        Object state) {
    IdleConnectionCloserThread.ensureRunning(this, KEEP_ALIVE_DURATION_SECS, KEEP_ALIVE_MONITOR_INTERVAL_SECS);
    return super.requestConnection(route, state);
}
项目:lams    文件:AbortableHttpRequest.java   
/**
 * Sets the {@link ClientConnectionRequest} callback that can be
 * used to abort a long-lived request for a connection.
 * If the request is already aborted, throws an {@link IOException}.
 *
 * @see ClientConnectionManager
 */
void setConnectionRequest(ClientConnectionRequest connRequest) throws IOException;
项目:purecloud-iot    文件:AbortableHttpRequest.java   
/**
 * Sets the {@link org.apache.http.conn.ClientConnectionRequest}
 * callback that can be used to abort a long-lived request for a connection.
 * If the request is already aborted, throws an {@link IOException}.
 *
 * @see org.apache.http.conn.ClientConnectionManager
 */
void setConnectionRequest(ClientConnectionRequest connRequest) throws IOException;