Return-Path: X-Original-To: apmail-hc-httpclient-users-archive@www.apache.org Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DBFEB9B64 for ; Fri, 13 Apr 2012 12:44:08 +0000 (UTC) Received: (qmail 36587 invoked by uid 500); 13 Apr 2012 12:44:08 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 36512 invoked by uid 500); 13 Apr 2012 12:44:07 -0000 Mailing-List: contact httpclient-users-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-users@hc.apache.org Received: (qmail 36502 invoked by uid 99); 13 Apr 2012 12:44:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Apr 2012 12:44:07 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of tom.tung.dyb@gmail.com designates 209.85.210.43 as permitted sender) Received: from [209.85.210.43] (HELO mail-pz0-f43.google.com) (209.85.210.43) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Apr 2012 12:44:00 +0000 Received: by dadn15 with SMTP id n15so4527536dad.30 for ; Fri, 13 Apr 2012 05:43:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=GvTzSWBZ06f16q168ck9o0ENzk4iODA8lPa/FZWar/k=; b=WMQZXIt3o8c7nak0F4sKCfcWqOOx08DZ7gvQR4Mz6haHe01B1dDIw86lKt5xqJXdsN 44X5o/6ty4gC8AsaD8ty+yi8OkWAIPwRXY+biCIoGNEbJJmvJJsmQDnavs+IZNjcax5F FvvItwObxfpGFveEew31Kt1YO9GP54Cqdc/hf82njJteIFEijOr+9vKqqc3NFOrnHre+ D1eiRhTfPNLAMAdN/B9mJIJV3Vxp20v7r/DRWIjha3vKw1bmwUJlhNnScbBJpYWsZdev 2EhLlAcKMLRke5/lnZ9rR3junqESg06gQc81y+BpiAWJDxCUvOH/w3r4CPviHLD6SPFF XVgQ== Received: by 10.68.233.234 with SMTP id tz10mr4634083pbc.68.1334321018574; Fri, 13 Apr 2012 05:43:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.239.36 with HTTP; Fri, 13 Apr 2012 05:43:18 -0700 (PDT) From: =?UTF-8?B?6JGj546J5YawIFRvbSBZdWJpbmcgRG9uZw==?= Date: Fri, 13 Apr 2012 20:43:18 +0800 Message-ID: Subject: When using ProxySelectorRoutePlanner with DefaultHttpClient, will ProxySelector.connectFailed() get called? To: httpclient-users@hc.apache.org Content-Type: text/plain; charset=ISO-8859-1 Hi, I have implemented my own ProxySelector, so that when connection fails, connectFailed is called and the proxy can be suspended or removed from the list. I used my ProxySelector implementation to construct a ProxySelectorRoutePlanner, and set it to be the RoutePlanner of a DefaultHttpClient. I let ProxySelector.select return an invalid proxy (like "localhost:1234"). When I call HttpClient.execute, a HttpHostConnectException("Connection to http://127.0.0.1:1234 refused") is thrown as expected, but ProxySelector.connectFailed never get called. I wish to ask what else do I need to do? Do I need to implement a HttpRequestRetryHandler that calls ProxySelector.connectFailed? Thanks! --- Cheers, Tom Dong --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org For additional commands, e-mail: httpclient-users-help@hc.apache.org