Rob, thanks for your answer. I don't still understand how to implement this RIAP pseudo-protocol, can you please provide me with an example based on my classes?
Also, I'm not trying to avoid duplicating code, but to have a different resource handle the original request, only for one method: GET Thanks again. On Wed, Jul 15, 2009 at 1:06 PM, Rob Heittman<rob.heitt...@solertium.com> wrote: > For inter-resource communication we tend to use the RIAP pseudoprotocol: > > http://wiki.restlet.org/docs_1.2/13-restlet/48-restlet/86-restlet/45-restlet.html > > This correctly provides all the relevant routing and construction behavior. > It is cheaper than making an actual http request to localhost or something > abominable like that, but still a bit expensive as the full Restlet > infrastructure is invoked each time. > > I think the cheapest choice is to factor out the interesting behavior you're > trying to avoid duplicating into a separate function or class, and call it > directly in both places -- but this choice may be too brittle or not > possible for other reasons specific to the resources. > > On Wed, Jul 15, 2009 at 11:40 AM, Fabian Mandelbaum <fmandelb...@gmail.com> > wrote: >> >> Is this the correct way to wire restlets internally? Is there any >> other (more elegant, more performant, "just working", whatever) >> solution to this problem? > > -- Fabián Mandelbaum IS Engineer ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2371538