dev@jsr311.java.net

Re: JSR311: matrix params in _at_Path

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Wed, 02 Jul 2008 11:06:11 -0400

On Jul 2, 2008, at 9:21 AM, Bill Burke wrote:

> One commenter on this list or user stated an interesting fact. You
> can't currently dispatch based on matrix parameters.

That is by design. Resource classes are associated with the
hierarchical part of the URI (the path) rather than with qualifiers
(matrix and query parameters).

Resource classes represent a type of resource and you can use
@QueryParam and @MatrixParam within a resource class to extract any
qualifiers. Allowing matrix parameters in @Path would, I suppose,
allow for more granular resource types but that would come at the cost
of more complex matching and the algorithm is already complex enough
IMO. More granular dispatch can, anyway, be undertaken by the resource
class taking into account not only the presence of qualifiers but also
their values.

Marc.

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