Re: New sketch of updated APIs

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Fri, 20 Apr 2007 09:57:18 +0200

On Apr 20, 2007, at 9:09 AM, Dhanji R. Prasanna wrote:

> On 4/20/07, Paul Sandoz <> wrote:
> Marc Hadley wrote:
> > Having played with it a little I think I prefer the builder
> approach,
> > its very flexible for fine tuning a response and the static
> methods of
> > Response maintain the simplicity of creating a particular kind of
> > response that contains all the necessary metadata.
> >
> +1
> =)
> Is the builder going to sit as a pre-annotated utility with
> optionally creating your own annotated versions?
> I believe the canonical case should encourage one and offer the
> other as a seldom-use/low-level alternative. I propose the builder
> as the standard approach.

Response/ResponseProvider are not annotated. ResponseProvider defines:

"the contract between a returned instance and the runtime should the
returned instance need to provide metadata to the runtime. An
application class can implement this interface directly or a method
can return an instance of Response instead."

IMHO (at risk of repeating myself!) unless there are compelling use-
cases for the latter the former is sufficient.

The nice thing is the latter and former are rather independent. It
appears we have some consensus on the former to take this forward,
while still allowing use-cases for the latter to be proposed/
discussed/investigated. Is that a reasonable way forward?