dev@jsr311.java.net

Re: Consume/Produce and Input/Output

From: Dhanji R. Prasanna <dhanji_at_gmail.com>
Date: Tue, 29 May 2007 19:19:46 +1000

I am in favor of explicitly annotating the method regardless of its name or
implications of its formal parameter list.

On 5/29/07, Paul Sandoz <Paul.Sandoz_at_sun.com> wrote:
>
> Jerome Louvel wrote:
> > Hi Paul,
> >
> > The advantage is to allow one to specify what each parameter gets. This
> is
> > especially for method taking multiple parameters:
> >
> > public void put(@Input String value, @Variable String customerId){
> > ...
> > }
> >
>
> OK. In summary, IIUC, you are proposing implicit declaration of an HTTP
> method and explicit declaration of the input/output, where as Marc and I
> are proposing explicit declaration of an HTTP method (and what it
> consumes/produces) and implicit declaration of the request entity (since
> that is the only parameter which need not be annotated among a list of
> method parameters).
>
>
> > Note that put() method doesn't need to be annotated itself because its
> name
> > and the presence of @Input ensure it is correctly detected.
>
> What happens if the put (or delete/post/head) method does not consume
> any input or produce any output?
>
> Paul.
>
> > The @Variable
> > annotation would also use the parameter name by default as the name of
> the
> > URI variable to extract ("customerId" here).
> >
>
> --
> | ? + ? = To question
> ----------------\
> Paul Sandoz
> x38109
> +33-4-76188109
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_jsr311.dev.java.net
> For additional commands, e-mail: dev-help_at_jsr311.dev.java.net
>
>