Hi all,

First of all, I love the RepresentationInfo. :) Thanks for adding
this. :)

Some comments against that release:
- I wonder how to create a RepresentationInfo since it is abstract;
  for the time being I created my own RepresentationInfo class derived
  from the abstract class.
- Wouldn't it make sense to add a constructor
  RepresentationInfo(Variant variant, Date modificationDate)
  This constructor would add all information available from the
  variant (i.e. MediaType, Language etc.) to the RepresentationInfo
  plus the modification time.
- Previously I used Resource(Context, Request, Response) in my derived
  Resource classes. This constructor is not available anymore in
  ServerResource. Not a big problem, though, even I have had to make
  my properties non-final, which is also not a big problem since
  Resources are not meant to be thread-safe.
- Related to the above mentioned point, I allowed that my derived
  Resources throw an exception in the constructor. This was very
  convenient since Restlet automatically issued an error status. While
  moving my initialisation stuff to the ServerResource.init() method I
  recognised that init() does not allow to throw an exception, so I
  have to wrap my initialisation code in a try / catch block.
  I wonder if UniformResource#init() shouldn't be changed to

    protected void init() throws ResourceException;

  (or maybe Exception instead of ResourceException?)

  If an exception was thrown, Restlet 1.2 could handle it like Restlet
  1.1 handled exceptions thrown by the constructor.

Best regards,
Lars
-- 
http://www.semagia.com

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

Reply via email to