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

[jsr339-experts] Re: [jax-rs-spec users] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Concerns about the client-side exception hierarchy

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Fri, 30 Mar 2012 17:12:31 +0100

On 30/03/12 16:53, Marek Potociar wrote:
>
> On Mar 30, 2012, at 5:41 PM, Sergey Beryozkin wrote:
>
>> If we were to have a separate ClientResponse not related to Response:
>>
>> I think some utility conversion support might be needed but as I said
>> in the other email this might rarely be needed. Consider it be some
>> kind of the bridge support between the Response and ClientResponse
>> which may optionally be exercized in very few cases, technically most
>> of 400+ error responses are supposed to contain empty bodies
>
> Ok, so in case you completely decouple the Response and ClientResponse,
> what are you then going to do about Response.Status and
> Response.StatusType? Duplicate? Keep? Just use int codes in the
> ClientResponse? Will you also provide a duplicate response builder for
> the client response?
>
> Lot's of new code and classes...
>

Appears to me you are looking at the following two options are the main
contenders,

- Keep the single Response (possibly with few updates)
- Get ClientResponse extending Response but basically deprecate
getMetadata() which actually is kind of done in 2.0 already (at the java
docs version)

We are nearly there :-),

Sergey

> Marek