@Override
 public void connect(
     final HttpClientConnection managedConn,
     final HttpRoute route,
     final int connectTimeout,
     final HttpContext context)
     throws IOException {
   Args.notNull(managedConn, "Managed Connection");
   Args.notNull(route, "HTTP route");
   final ManagedHttpClientConnection conn;
   synchronized (managedConn) {
     final CPoolEntry entry = CPoolProxy.getPoolEntry(managedConn);
     conn = entry.getConnection();
   }
   final HttpHost host;
   if (route.getProxyHost() != null) {
     host = route.getProxyHost();
   } else {
     host = route.getTargetHost();
   }
   final InetSocketAddress localAddress = route.getLocalSocketAddress();
   SocketConfig socketConfig = this.configData.getSocketConfig(host);
   if (socketConfig == null) {
     socketConfig = this.configData.getDefaultSocketConfig();
   }
   if (socketConfig == null) {
     socketConfig = SocketConfig.DEFAULT;
   }
   this.connectionOperator.connect(
       conn, host, localAddress, connectTimeout, socketConfig, context);
 }
 @Override
 public void routeComplete(
     final HttpClientConnection managedConn, final HttpRoute route, final HttpContext context)
     throws IOException {
   Args.notNull(managedConn, "Managed Connection");
   Args.notNull(route, "HTTP route");
   synchronized (managedConn) {
     final CPoolEntry entry = CPoolProxy.getPoolEntry(managedConn);
     entry.markRouteComplete();
   }
 }
 @Override
 public void upgrade(
     final HttpClientConnection managedConn, final HttpRoute route, final HttpContext context)
     throws IOException {
   Args.notNull(managedConn, "Managed Connection");
   Args.notNull(route, "HTTP route");
   final ManagedHttpClientConnection conn;
   synchronized (managedConn) {
     final CPoolEntry entry = CPoolProxy.getPoolEntry(managedConn);
     conn = entry.getConnection();
   }
   this.connectionOperator.upgrade(conn, route.getTargetHost(), context);
 }