users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: Re: Re: Re: Re: FYI: JAX-RS 2.0 PR date postponed

From: Bill Burke <bburke_at_redhat.com>
Date: Wed, 12 Sep 2012 14:18:39 -0400

On 9/12/2012 2:08 PM, Santiago Pericas-Geertsen wrote:
>
> On Sep 12, 2012, at 11:50 AM, Sergey Beryozkin wrote:
>
>> I still haven't got an answer as to why this provider needs 'Type' and
>> 'Annotation[]' (knowing that we are talking about simple non-message
>> body parameters). Without these two parameters, the runtime can key
>> ParamConverters, and it knows Class<?> of such parameters.
>
> I think Bill may have pointed this out already. One example for
> Annotation[] is @Encoded. Isn't whatever built-in provider you have know
> handle to @Encoded for say @QueryParam? E.g.,
>

Couldn't you add the Annotation[] array list to the ParamConverter
method signature? Then you wouldn't need a Provider.

> @QueryParam("foo") @Encoded Foo f, ...
>
> As for generic types, JAX-RS 1.X already supports List<T>, Set<T> and
> SortedSet<T> for params, and the proposed signature seems consistent
> with existing ones.
>
> Having said I'm not sure about how multi-valued params would be
> handled by ParamConverter. Consider,
>
> @HeaderParam("Link") Set<Link> linkHeaders, ...
>
> Should I define a converter for Link (possibly called multiple times)
> or should I define a converter for Set<Link> (and that leads to other
> questions)?
>

A related queston is, should HeaderDelegate be deprecated?

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com