dev@jsr311.java.net

Re: ProduceMime and ConsumeMime

From: Dhanji R. Prasanna <dhanji_at_gmail.com>
Date: Sat, 7 Apr 2007 15:21:48 +1000

On 4/7/07, Marc Hadley <Marc.Hadley_at_sun.com> wrote:
>
> On Apr 6, 2007, at 3:59 AM, Jerome Louvel wrote:
> Naming is always tricky. One thing I'd like to maintain is the
> ability to specify the (possibly different) types of consumed and
> produced entities at the class level since that reduces the number of
> annotations you need on each method.


I thought that the annotation on the entity parameter was a good way to
indicate consumption type.
Btw, will this JSR be able to take advantage of JSR 308 to do something
like:

@HttpMethod
public Representation<@MediaType("text/xml") String>
getString(@MediaType("text/raw") String text) {
//...
}




Marc, I also like your idea of tagging classes with "global" mimetypes, I
certainly think there is a case for that to reduce verbosity.
I would encourage different names at the class level though, to dispel
confusion about annotations appearing in several places.

Dhanji.