users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: Re: Injection of client-side artifacts

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Fri, 15 Jun 2012 15:46:58 +0100

On 15/06/12 15:20, Bill Burke wrote:
>
>
> On 6/15/12 9:58 AM, Sergey Beryozkin wrote:
>> On 15/06/12 14:01, Bill Burke wrote:
>>>
>>>
>>> On 6/15/12 6:50 AM, Marek Potociar wrote:
>>>>
>>>> On Jun 5, 2012, at 5:57 PM, Bill Burke wrote:
>>>>
>>>>> Looks pretty cool. I like it.
>>>>>
>>>>> The only problem I see is, how does a user create a Configuration?
>>>>
>>>> Grabbing a proprietary configuration implementation was what I had in
>>>> mind.
>>>>
>>>
>>> Don't like this idea.
>>>
>>>>> Right now because of the enable/disable methods, its quite a complex
>>>>> interface to implement.
>>>>
>>>> Enable/disable has been removed in EDR3. We can further discuss
>>>> whether or not it makes sense to support configuration changes in
>>>> WebTarget / Invocation.Builder. I'm not sure I like the idea of
>>>> dropping this at the moment, but I'm open to discussion.
>>>>
>>>
>>> Not asking to drop it, just move it to another interface.
>>>
>> I would not mind it dropped, but may be it just me :-). I'm not sure it
>> is practical to get individual targets updated after they were created,
>> and when it is indeed required then IMHO the better idea would be to
>> avoid doing it at the application level code (ex. updating passwords
>> that might be needed to get a given target consumed) and resolve it at
>> the filter level, for ex, by setting an appropriate header.
>>
>> I guess there could be some valid cases there which do require the
>> updates in the application code but I'm just not aware of them
>>
>
> You need to be able to add features/properties/providers to WebTargets.
> For example, a specific WebTarget may require authentication, message
> signing, etc.
>
> For example
>
> WebTarget target = client.target("https://somecurewebsite.com");
> target.enableFeature(new DigestAuthentication("bill, "geheim"));
>
OK, makes sense. I can imagine that the name & password can be
parametrized somehow, particularly when the target is created say in the
context of server call processing, etc

What about InvocationBuilder, when would one want to update the
configuration on it ?

Sergey

>
>
>