hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gurmeet Budhraja <guri.mailingli...@gmail.com>
Subject Re: Persistent Connection Manager with Proxy Configuration on Client side version 3x
Date Mon, 11 Jul 2011 17:45:35 GMT
Thanks Vasu for the steps mentioned. I am basically concerned about the
internal working of Connection Manager, specially how does it creates
connections based on the proxy configurations passed.  I have downloaded
full code base and tried to track the same but not able to.

Once the below steps are done, when a request comes in, the connection
manager requests for connection based on the configurations, Once the call
reached getConnectionWithTimeout() in MultiThreadedHttpConnectionManager, it
looks for connections if existing, this is point where i am trying to figure
out the logic of getting connections, in case of proxy Configuration bein
used. In Case of normal flow, i do see we have mapHosts hashMap which
maintains and matches for existing connectionsList but don't see any check
based on proxyHost.

Any suggestions on that internal working of http Client for creating
connections in case of Proxy Configuration? Please note i am working with
Http Client 3x - can't upgrade to 4x for time being.




On Mon, Jul 11, 2011 at 4:10 PM, Vasudevan Comandur <vcomandur@gmail.com>wrote:

> Hi,
>
>   Use the following sequence of calls to setup proxy parameters with
> MultithreadedHttpConnectionManager for version 3.1.
>
>   1. Create a new MultithreadedHttpConnectionManager
>   1a. getHostConfiguration
>   2. Authscope with Proxy parameter setting (HOST & Port number)
>   3. Usernamepasswordcredentials (username, password) if you have
> username/password configured in proxy.
>   4. setProxy (object from 1a, ProxyHost, ProxyPort)
>   5. setProxyCredentials (object of step2, object of step3)
>
>   These above steps should set the proxy settings. I hope his helps.
>
> Regards
>  Vasu
>
> On Mon, Jul 11, 2011 at 3:16 PM, Gurmeet Budhraja <
> guri.mailinglists@gmail.com> wrote:
>
> > Hi
> >
> > I am trying to understand how does MultiThreadedHttpConnectionManager
> > function when using Proxy configurations in Client. I tried to look at
> the
> > call for creating connection manager in getConnectionWithTimeout() but
> not
> > able to figure out any setting being used for proxyHost and proxyPort.
> >
> > Kindly suggest - any suggestion/help/samples would be helpful.
> >
> >
> > Thanks
> > Guri
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message