public class MyResourceFinder extends Finder {
@Override public ServerResource create(Request request, Response
response) {
return new MyResource(...);
}
}
...
attach("/res1", MyResourceFinder.class);
On Fri, Mar 5, 2010 at 5:31 AM, <[email protected]> wrote:
> Hello Rhett,
>
> Thanks for the help(and the clarification of the "resource" instance).
>
> The way I am looking at it is that i would like to have an "attach" method
> that looks like this:
>
> attach(String pathTemplate, Resource target)
>
> e.g.
>
> attach("\res1, new MyResource (,,));
>
> But maybe this isn't as straightforward by just overriding the "attach"
> method...since from what I've seen in the source is that they pretty much
> make use of the createFinder method. And the internals of this method appear
> to deal with only "Class"es.
>
> What I would like to know, is how deep into the source code would I need to
> go the make this mod possible.
>
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2455450