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

[jsr339-experts] Re: FWIW

From: Bill Burke <bburke_at_redhat.com>
Date: Fri, 26 Aug 2011 14:13:03 -0400

On 8/26/11 11:16 AM, Marek Potociar wrote:
> FWIW, in fact, if you were not pushing so much against builders and for interface reduction, I would have separated
> current HttpRequest/Response into mutable and immutable interfaces using Builders. That's btw. more aligned with JAX-RS
> 1.x style as well as better respect SoC principle. (Also from my past experience it seems to make a lot of sense to keep
> mutable and immutable interfaces separated, but this is admittedly hard to generalize upon.)
>

Here was my line of reasoning for pushing so much against builder
interfaces and simplyfying things:

Interceptors needed both read and write access to the
HttpRequest/Response. HttpRequest/Response were made mutable because of
this. So, if request/response are readable and mutable, and every use
case needs a readable and mutable request/response, what's the point of
having builder interfaces? Also, if HttpRequest/Response are already
mutable, why not interact with them directly (hence Invocation extending
HttpRequest)?

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com