On Fri, Jan 27, 2012 at 9:28 AM, Koen Maes <k...@koma.be> wrote:

> double checking, and handle does not provide req, resp as parameters,
> either.
>

Are you talking about ServerResource.handle()? You probably shouldn't
override that if you're using annotated methods.


But in the flow of handling, I assume everything is done overriding
> handle() whereas I am unsure at one point in the overall handling
> "toRepresentation(...)" is being called.
> That's why I opted for overriding handle()
>

toRepresentation is called when converting the return value of the
annotated handler method to a representation. It's really the ideal place
to copy values from the returned object into the representation metadata.
Call super.toRepresentation(source, target) to get the representation, and
then use whatever machinery you need to get information out of the source
and into that representation.

--tim

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

Reply via email to