Serge,

The init(Context, Request, Response) is automatically called by the Finder
class. In the case of SpringFinder, it didn't worked properly until the
changes from today in SVN trunk.

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




-----Message d'origine-----
De : silyn [mailto:[email protected]] 
Envoyé : mardi 9 juin 2009 02:56
À : [email protected]
Objet : ServerResource and context

Since ServerResource(Context context, Request request, Response response) is
not available (as it used to be the case with now deprecated Resource), I am
wondering how to pass context to the ServerResource?

Obviously, there is init(Context, Request, Response) but who (or what) is
going to call it? In particular in Finder's public ServerResource
create(Class<? extends ServerResource> targetClass, Request request,
Response response) (line 219) only a default constructor is called without
subsequent call to init as it used to with (all now deprecated) things like
protected Handler createTarget(Class<? extends Handler> targetClass, Request
request, Response response).

Accordingly, the following in Finder docs does not seem to work as promised:
"Restlet that can find the target server resource or handler that will
effectively handle the call. Based on a given ServerResource or Handler
subclass, it is also capable of instantiating the target with the context,
request and response without requiring the usage of a Finder subclass. It
will use the default constructor then invoke the
UniformResource.init(Context, Request, Response) method."

Can someone please clarify all this?

Thanks,

Serge

-- 
View this message in context:
http://n2.nabble.com/ServerResource-and-context-tp3046623p3046623.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

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

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

Reply via email to