Return-Path: X-Original-To: apmail-hc-dev-archive@www.apache.org Delivered-To: apmail-hc-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9732B90A5 for ; Wed, 29 Feb 2012 07:44:34 +0000 (UTC) Received: (qmail 96452 invoked by uid 500); 29 Feb 2012 07:44:34 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 96278 invoked by uid 500); 29 Feb 2012 07:44:30 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 96217 invoked by uid 99); 29 Feb 2012 07:44:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Feb 2012 07:44:28 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Feb 2012 07:44:25 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 5043854D63 for ; Wed, 29 Feb 2012 07:44:04 +0000 (UTC) Date: Wed, 29 Feb 2012 07:44:04 +0000 (UTC) From: "Alibek Jorajev (Commented) (JIRA)" To: dev@hc.apache.org Message-ID: <1350552465.1703.1330501444333.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <985644175.29325.1330453906632.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HTTPCLIENT-1169) DefaultClientConnectionOperator - ability to set socket factory MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HTTPCLIENT-1169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13218965#comment-13218965 ] Alibek Jorajev commented on HTTPCLIENT-1169: -------------------------------------------- Hello Oleg, ok, I understand now. thanks for your time to reply. regards, Alibek On Tue, Feb 28, 2012 at 7:29 PM, Oleg Kalnichevski (Resolved) (JIRA) > DefaultClientConnectionOperator - ability to set socket factory > --------------------------------------------------------------- > > Key: HTTPCLIENT-1169 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1169 > Project: HttpComponents HttpClient > Issue Type: Wish > Components: HttpClient > Environment: Android, api level 12. > Reporter: Alibek Jorajev > Priority: Minor > > DefaultClientConnectionOperator internally uses plain socket factory: > private static final PlainSocketFactory staticPlainSocketFactory = new PlainSocketFactory(); > I could override DefaultHttpClient, createClientConnectionManager() method and for HTTP scheme I can register my own socket factory. But for HTTPS, I would like to keep org.apache.http.conn.ssl.SSLSocketFactory. but in the DefaultClientConnectionOperator.openConnection(), I would like still to supply my own plain socket which goes underneath of layered socket: > public void openConnection(OperatedClientConnection conn, > HttpHost target, > InetAddress local, > HttpContext context, > HttpParams params) > throws IOException { > ..... > final Scheme schm = schemeRegistry.getScheme(target.getSchemeName()); > final SocketFactory sf = schm.getSocketFactory(); > final SocketFactory plain_sf; > final LayeredSocketFactory layered_sf; > if (sf instanceof LayeredSocketFactory) { > plain_sf = staticPlainSocketFactory; <= ======== I would like to replace this with my own factory. it is hard coded now. > layered_sf = (LayeredSocketFactory)sf; > } else { > plain_sf = sf; > layered_sf = null; > } > > . . . . .. . . > } // openConnection > -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org