users@jersey.java.net

Re: [Jersey] "MessageBodyReader" for PathParam

From: Paul Sandoz <Paul.Sandoz_at_oracle.com>
Date: Thu, 9 Sep 2010 13:01:04 +0200

Hi,

Can you give a more concrete example?

You can use a ResourceFilterFactory:

   https://jersey.dev.java.net/nonav/apidocs/latest/jersey/com/sun/jersey/spi/container/ResourceFilterFactory.html
   https://jersey.dev.java.net/nonav/apidocs/latest/jersey/com/sun/jersey/api/container/filter/package-summary.html

to decide whether to filter for a specific method by analyzing the
resource class/emthods and the @Path annotations. The Path value can
be parsed by UriTemplate to obtain path parameter names.

The ResourceFilterFactory can have injected on it the UriInfo from
which path parameters can be obtained.

Hth,
Paul.


On Sep 9, 2010, at 1:03 AM, tofferliu wrote:

>
> Hi,
>
> I'd like to do some filtering on the PathParam values before it gets
> passed
> onto the method. Is there a provider that I can implement to do this?
>
> Thanks,
> Toffer
> --
> View this message in context: http://jersey.576304.n2.nabble.com/MessageBodyReader-for-PathParam-tp5512647p5512647.html
> Sent from the Jersey mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>