dev@jsr311.java.net

Re: JSR311: HeaderProvider pecularities

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Fri, 16 Nov 2007 09:34:42 -0500

On Nov 16, 2007, at 7:27 AM, Heiko Braun wrote:
>
> What if you have two different headers that are Date values (or
> ints, or
> whatever), but have different formats?
>
> Shouldn't finding HeaderProviders be a function of header name and
> type?
>
Actually I've been wondering whether HeaderProvider has any real
utility. @HeaderParam will work with any type that has a String
constructor, a List<String> constructor or a static valueOf(String)
method. Headers returned via a Response can be serialized by using the
values toString method. HeaderProvider allows you to decouple the
value class and the serialization/deserialization logic but its not
clear to me if that is particularly useful so far.

Marc.

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