dev@jsr311.java.net

Re: Proposal for rework of spi package (was Re: "Dual dispatch")

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Thu, 26 Apr 2007 10:45:39 -0400

On Apr 26, 2007, at 6:26 AM, Dhanji R. Prasanna wrote:
>
> @Externalizer(classes={Thing.class }, type="application/thing")
> public class ThingExternalizer implements
> TypeStreamingProvider<Thing.class> {
>
> Is there a case for multiple mediatypes too? for example:
>
> @Externalizer(entity = Thing.class, mediaType = { "text/html",
> "text/xhtml" })
>
> I can see this being quite useful.
> (note that you dont need braces {} when referring to a single
> element, it is autoboxed into an array)
>
Yes, I had in mind a comma separated list but with autoboxing I think
the array approach is neater. We should do the same for ProduceMime
and ConsumeMime too.

Marc.

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