Hi,

   HTTPClient is going to be configured either to use proxy or not to use
proxy. If you have configured for a proxy, try to
   use that instance for all data transfer

   If you have an HTTPCLient instance configured not to use proxy, use this
instance for sending data to host.

  If you are having multiple proxy servers in your environment wherein you
would like to dynamically use different HTTPClient
  instance, one for each proxy, then you could use the instance you choose
based on your own data structure which knows
  which HTTPClient instance to use.

regards
 Vasu

On Mon, Jul 11, 2011 at 11:15 PM, Gurmeet Budhraja <
[email protected]> wrote:

> 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 <[email protected]
> >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 <
> > [email protected]> 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
> > >
> >
>

Reply via email to