dev@jsr311.java.net

Re: EntityProvider changes

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Mon, 20 Aug 2007 15:01:01 -0400

On Aug 18, 2007, at 5:48 AM, Dhanji R. Prasanna wrote:
>
> (ii) Make the mediaType arguments of readFrom and writeTo be of type
> MediaType rather than String.
>
> Are there any annotations that refer to MediaType? Something like
> @Accept("application/octet-stream")?
>
Both @ProduceMime and @ConsumeMime refer to a media type but their
values are both strings. You can apply these annotations to an entity
provider to declare the media types it supports as described in
section 3.1 of the latest spec draft[1].

> How would we configure such an annotation if MediaType were not a
> string (or supported literal)?
>
Not sure I understand your question. Just to be clear, the suggested
change above applies to the type of the mediaType arguments of
EntityProvider.readFrom and EntityProvider.writeTo, not an annotation
property.

Marc.

[1] https://jsr311.dev.java.net/drafts/spec20070703.pdf

---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.