users@jax-rs-spec.java.net

[jax-rs-spec users] ContainerRequestFilter - acccess to method or annotations?

From: Jan Kronquist <jan.kronquist_at_jayway.com>
Date: Tue, 16 Oct 2012 21:41:38 +0200

Hi

I'm trying ContainerRequestFilter and was wondering if there is any way to
get the resource method or annotations of the resource method?

Using the UriInfo I can access the resources, but not the method, ie

requestContext.getUriInfo().getMatchedResources();

In a ContainerResponseFilter I can access the annotations
using: responseContext.getEntityAnnotations()

Is there a reason why such a method is not available? I would prefer to
have access to all methods including subresource-methods.

Or should I use ResourceInfo? How should the injection work? Is there an
implementation supporting this? (I have tested with jersey-2.0-m9)

However, ResourceInfo does not contain the subresource classes or methods?

/Jan