On Wed, Jul 14, 2010 at 9:51 AM, Claus Ibsen <[email protected]> wrote:
> Hi
>
> You most likely need to use a per http component for the different
> proxy settings.
> the proxy is generally per component based.
>
> So when you need a new proxy you just add a new http component
> context.addComponent("http2", context.getComponent("http"));
>

And then set the proxy settings as you want on http2 component.
You may also just create a new component which is more understandable

HttpComponent http2 = new HttpComponent();
http2.setProxyStuffHere
context.addComponent("http2", http2);

The current logic in http endpoint is not cut for using different
proxy settings per endpoint.



> And then use http2 in your endpoints.
>
>
>
>
> On Wed, Jul 14, 2010 at 8:38 AM, Cappa Roberto
> <[email protected]> wrote:
>> The recipient list was one of choice I've evaluated, but there is another 
>> problem: when I create a dynamic recipient list, for example 
>> http://host:port?porxyHost=proxy1 it works. In the next route execution 
>> (without restarting the context) I set http://host:port?porxyHost=proxy2, 
>> but the route continues to use the old one (proxy1). Is there a sort of 
>> component caching, that store component and options and reuse it in the next 
>> execution?
>>
>> Thanks
>> ________________________________________
>> Da: Claus Ibsen [[email protected]]
>> Inviato: martedì 13 luglio 2010 21.43
>> A: [email protected]
>> Oggetto: Re: Dynamically change HTTP endpoint parameters
>>
>> Hi
>>
>> I do not know if the Apache HTTP Client can change proxy value at runtime?
>>
>> You can with Camel stop the HTTP producer, adjust the http endpoint or
>> create a new http endpoint, and then create a new http producer using
>> that endpoint.
>>
>> Or use recipient list EIP which can use dynamic endpoints.
>>
>>
>> On Tue, Jul 13, 2010 at 4:59 PM, Cappa Roberto
>> <[email protected]> wrote:
>>> Hi,
>>>
>>> I need to change at runtime some of HTTP endpoint options, for example 
>>> proxyHost and proxyPort. It seems possibile to use placeholders, but they 
>>> can be only  used in a static manner with a configuration file. In my use 
>>> case I need to change these parameters at runtime, for example in a 
>>> Processor. Is there a way to obtain this behaviour?
>>>
>>> Thanks.
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Author of Camel in Action: http://www.manning.com/ibsen/
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Reply via email to