Re: Consume/Produce and Input/Output

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 29 May 2007 09:15:11 +0200

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?


> 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