dev@jsr311.java.net

Re: JSR311: Header and Response Code constants

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Fri, 14 Mar 2008 17:47:38 -0400

On Mar 14, 2008, at 4:13 PM, Marc Hadley wrote:

> On Mar 14, 2008, at 3:32 PM, Bill Burke wrote:
>
>> Sure, but there is a list of currently defined/registered/commonly-
>> used/whatever headers/codes.
>>
>> What I really meant was I want to have things like OK and CONTENT-
>> TYPE as constants as well.
>>
> OK, I'm fine with that since it allows the API and impl classes to
> use those. I just don't want to add in every conceivable header and
> code since the mass would obscure the most common/useful ones.
>
Give that we'll have

Response r = Response.status(Status.NO_CONTENT).build();

it seems redundant to also have

Response r = Response.noContent().build();

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.

>
>> Marc Hadley wrote:
>>> On Mar 14, 2008, at 1:12 PM, Bill Burke wrote:
>>>> Just wanted to add that having a complete list of headers/code
>>>> constants is invaluable in testing.
>>>>
>>> There is no complete list, both headers and status codes are
>>> extensible.
>>> Marc.
>>> ---
>>> Marc Hadley <marc.hadley at sun.com>
>>> CTO Office, Sun Microsystems.
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_jsr311.dev.java.net
>>> For additional commands, e-mail: dev-help_at_jsr311.dev.java.net
>>
>> --
>> Bill Burke
>> JBoss, a division of Red Hat
>> http://bill.burkecentral.com
>>
>> ---------------------------------------------------------------------
>> 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.
>
>
>
> ---------------------------------------------------------------------
> 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.