jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] Re: Some comments about Target and Invocation

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Tue, 30 Aug 2011 23:03:29 +0100

On 30/08/11 22:54, Sergey Beryozkin wrote:
> Well, these comments refer to the previous revision, but I'll continue
> as I guess it could be relevant anyway...
>
> On 26/08/11 11:07, Marek Potociar wrote:
>>
>>
>> On 08/25/2011 01:38 PM, Sergey Beryozkin wrote:
>>> Hi
>>>
>>> Here are some comments about Target and Invocation [1]
>>>
>>> 1. Target.getUriBuilder()
>>>
>>> what is the idea behind this method ? In other words, what is the
>>> expected outcome of
>>>
>>> client.target("http://bar").getUriBuilder().build() ?
>>>
>>> I'm presuming getUriBuilder() needs to return a cloned builder. But
>>> I'm still not sure what is next after
>>> getUriBuilder() is invoked ?
>>
>> UriBuilder is just another representation of the target URI. Some
>> users may want to use it as a shortcut for:
>>
>> UriBuilder.fromUri(target.getUri());
>>
>> The returned uri builder is disconnected from the internal state of
>> the target.
>>
> I'm still not getting though what I'd use this method for ?
> To avoid typing UriBuilder.fromUri(target.getUri()); ?
> I can understand why UriInfo needs such methods - but not sure what I
> can do with getUriBuilder().build() or similar in context of working
> with URI
>
meant with "Target"