users@jersey.java.net

[Jersey] Re: Matching request URIs against _at_Path

From: Jakub Podlesak <jakub.podlesak_at_oracle.com>
Date: Thu, 07 Jul 2011 17:28:42 +0200

Hi Martynas,

look at [1] on how the runtime model gets created.
See the RootResourceUriRules constructor.
The accept method at [2] is the entry point for request
dispatching.

The WebApplicationImpl class is the place,
where the above things are bound together is [3].

HTH,

~Jakub

[1]http://java.net/projects/jersey/sources/svn/content/trunk/jersey/jersey-server/src/main/java/com/sun/jersey/server/impl/application/RootResourceUriRules.java?rev=5173
[2]http://java.net/projects/jersey/sources/svn/content/trunk/jersey/jersey-server/src/main/java/com/sun/jersey/server/impl/uri/rules/RootResourceClassesRule.java?rev=5173
[3]http://java.net/projects/jersey/sources/svn/content/trunk/jersey/jersey-server/src/main/java/com/sun/jersey/server/impl/application/WebApplicationImpl.java?rev=5173

On 07/05/2011 09:41 PM, Martynas Jusevicius wrote:
> Hey,
>
> we want to implement simple URI-pattern to resource class matching in
> PHP as Jersey does for JAX-RS.
> We will probably not use annotations, but we're more interested in the
> general algorithm - assembling URI templates and and finding the best
> match. Basically all that happens after a request arrives and before
> resource class is executed.
>
> Can you point to Jersey's implementation of that? Description, source
> code, JavaDoc - anything goes.
>
> Thanks,
>
> Martynas
> semantic-web.dk
>