On Mon, 2014-06-16 at 11:32 -0700, arcivanov wrote:
> Oleg Kalnichevski wrote
> > On Sun, 2014-06-15 at 18:24 -0700, arcivanov wrote:
> >> Hi Oleg,
> >> 
> >> RequestDirector and respectively DefaultRequestDirector have been
> >> deprecated
> >> as of 4.3 with no replacement suggested/provided. 
> > 
> > That bit of logic got moved to MainClientExec
> > 
> > http://hc.apache.org/httpcomponents-client-4.3.x/httpclient/xref/org/apache/http/impl/execchain/MainClientExec.html#346
> 
> Thanks a lot, that's what I thought, however I'm somewhat lost looking at
> how to extend this class, without actually trying to branch the
> HttpComponents, but rather introducing a new proxy provider behavior. My
> problem is as follows:
> 
> * MainClientExec.establishRoute is package-private, so I would have to place
> my overriding components in impl.execchain and I'd have to create bundle
> patches given that I'm using OSGI.
> * MainClientExec.createTunnelToProxy is private and cannot be overwritten at
> all
> * MainClientExec is hard-instantiated in
> http://hc.apache.org/httpcomponents-client-4.3.x/httpclient/xref/org/apache/http/impl/client/HttpClientBuilder.html#787
> - it's not a pluggable service. I could override
> HttpClientBuilder.decorateMainExec and created some decorator ClientExec but
> for that I would need to copy all the logic from the MainClientExec related
> to route handling and delegate the rest - seems quite cumbersome and would
> require quite a lot of validation testing.
> 
> Am I missing something major?
> 
> Thanks for your help!
> 
> - Arcadiy
> 

Hi Arcadiy

Unfortunately at this point there is no way around forking HttpClient if
you want to implement proxy chaining. We can however consider making it
possible to replace MainClientExec with a custom implementation.

Oleg  



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to