users@jersey.java.net

Use of ExtendedUriInfo

From: Luke Monahan <luke.monahan_at_remora.com.au>
Date: Mon, 2 Jun 2008 11:50:07 +1000

Hi All,

I noticed the ExtendedUriInfo interface in the Jersey docs (latest
0.8-ea-SNAPSHOT) and found it useful, but it doesn't seem to be injectable
like a plain UriInfo is. i.e.

@Context private ExtendedUriInfo uriInfo;

in a MessageBodyReader is null, wheras a UriInfo injected in the same manner
works fine.

Is there specific way I am meant to access this interface, or is it meant for
internal use only?

As a test I also tried using ExtendedUriInfo as a @Context annotated parameter
to a @GET annotated method which provoked the following exception:

com.sun.jersey.api.container.ContainerException: Method, public
javax.ws.rs.core.Response
com.tds.core.resource.agency.AgencyCollectionResource.getAgencies(com.sun.jersey.api.uri.ExtendedUriInfo),
annotated with GET of resource, class
com.tds.core.resource.agency.AgencyCollectionResource, is not recognized as
valid Java method annotated with @HttpMethod

Thanks in advance,

Luke.