users@jersey.java.net

Re: [Jersey] Jersey's (experimental) approach to support hypermedia constraint

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 10 Feb 2010 21:53:25 +0100

On Feb 10, 2010, at 9:46 PM, Jan Algermissen wrote:

>
> On Feb 10, 2010, at 9:11 PM, Paul Sandoz wrote:
>
>>
>> On Feb 10, 2010, at 8:39 PM, Jan Algermissen wrote:
>>
>>>
>>> On Feb 10, 2010, at 6:40 PM, Paul Sandoz wrote:
>>>
>>>> Exceptions can be an effective way of handling failure states
>>>> (the Jersey client API already uses such a pattern).
>>>
>>> What would you consider to be a 'failure state'? (Trying to align
>>> our thinking)
>>>
>>
>> A response >= 400 or a link type that is not present.
>
> Then we are not thinking along the same lines I'm afraid. From a
> REST POV these are not failures but just application states the
> client must expect and try to make the best of. Or, turned around:
> in a RESTful system the servers cannot be constrained to send a link
> of a particular type nor to send a representation of a particuar kind.
>

I think we are having problems with terminology.

A 4xx response does represent a client error or failure on the part of
the client, which i agree has to be dealt with and not ignored. I am
suggesting it can be useful to handle such responses as Java
exceptions because they are often not the most common form of response.

Paul.


> Clients cannot rely on such assumptions because that would couple
> clients and servers.
>
> That is why I think it is wrong to let the framework create the
> impression that clients could in fact make such assumptions.
>
> Jan
>
>
>>
>> Paul.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>
>
> -----------------------------------
> Jan Algermissen, Consultant
> NORD Software Consulting
>
> Mail: algermissen_at_acm.org
> Blog: http://www.nordsc.com/blog/
> Work: http://www.nordsc.com/
> -----------------------------------
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>