dev@jsr311.java.net

Re: JSR311: Header and Response Code constants

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Wed, 19 Mar 2008 08:35:50 -0700

OK, I'll leave those methods alone then.

Marc.

On Mar 19, 2008, at 6:24 AM, Stephan Koops wrote:
> Hi Marc,
>
> I also think, that it is easier to use if we also have Response r =
> Response.noContent().build();
> A lot of people will build Utility methods for something like that,
> if it is not available. I think, we should leave it in.
>
> Stephan
>>> Give that we'll have
>>>
>>> Response r = Response.status(Status.NO_CONTENT).build();
>>>
>>> it seems redundant to also have
>>>
>>> Response r = Response.noContent().build();
>> I rather like the conciseness of the latter, plus i think for
>> common stuff it reads better and links more easily to the JavaDoc
>> for specified behaviour. I found such methods convenient when we
>> added them as opposed to using status (using a constant type or
>> otherwise).
>>
>> It is also more consistent if things are change:
>>
>> Response.ok(entity).build();
>> Response.ok().entity(entity).build();
>>
>> (something that i learned was important to maintain when using the
>> builder model with the Jersey client API).
>>
>> Paul.
>>
>>> Unless anyone wants to object I intend to remove the no-arg static
>>> methods of Response (ok, noContent, serverError, notModified) when
>>> I add the Status constants ?
>>>
>>> I'll leave the variants with arguments since they nicely group
>>> together a set of interrelated metadata.
>>>
>>> Marc.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_jsr311.dev.java.net
> For additional commands, e-mail: dev-help_at_jsr311.dev.java.net
>

---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.