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

From: Sergey Beryozkin <>
Date: Fri, 30 Mar 2012 17:15:07 +0100

On 30/03/12 17:12, Sergey Beryozkin wrote:
> 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 can also deprecate getEntity() returning Object and recommend the
.getEntity(Object.class) for the server runtime to use when passing the
response entity to writers - sorry, haven't thought it through so may be
a silly idea :-)


> We are nearly there :-),
> Sergey
>> Marek