Hi Kirk,

I'm not clear on your actual requirements and wonder if there wouldn't be
alternative ways to implement it that would require less customization.

If URI templates provided by Restlet really can't fit your use case (even
though the default matching regex can be customized), the easiest way would
be to provide a MyRegexRoute class that would extend TemplateRoute and
override the score(Request, Response) method. Note that TemplateRoute is a
subclass of the Filter class so you can do further processing in the
beforeHandle() method.

Note that in Restlet 2.1, we'll complete the refactoring of the
Route/TemplateRoute classes so that Route will become abstract and just
declare the score(Request, Reponse) method (currently it is deprecated).

You can add routes directly to a Router using the modifiable Router#routes
property. Otherwise, you can indeed override the createRoute() method.

Also, why couldn't you attach your security filters to the corresponding
routes and then the resource classes to the security filters? You could have
several instances of the same security filters if necessary.

Best regards,
Jerome Louvel
--
Restlet ~ Founder and Technical Lead ~ http://www.restlet.org
Noelios Technologies ~ http://www.noelios.com




-----Message d'origine-----
De : Kirk Daries [mailto:[email protected]] 
Envoyé : vendredi 22 janvier 2010 17:38
À : [email protected]
Objet : RE: Re: URI Pattern matching based on regular expressions

apologies, meant to say 'a reference to the ROUTER in my 'application
context'...

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=24412
34

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2449948

Reply via email to