Re: Exceptions in general

2007-11-28 Thread Stephan Koops
Hello all, I agree fully with Paul. Exceptions are the modern way to handle things, that don't are the normal way. The same thing should be possible for doPut(..), doGet(..), getRepresentation(.) and so on on subclasses of org.restlet.resource.Resource. greetings Stephan Paul J. Lucas

Re: Exceptions in general

2007-11-28 Thread Tim Peierls
On Nov 28, 2007 5:38 AM, Stephan Koops [EMAIL PROTECTED] wrote: I agree fully with Paul. Exceptions are the modern way to handle things, that don't are the normal way. The same thing should be possible for doPut(..), doGet(..), getRepresentation(.) and so on on subclasses of

Re: Exceptions in general

2007-11-28 Thread Stephan Koops
Yes, you are right. greetings Stephan Tim Peierls schrieb: On Nov 28, 2007 5:38 AM, Stephan Koops [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I agree fully with Paul. Exceptions are the modern way to handle things, that don't are the normal way. The same thing should be

Re: various xslt related remarks

2007-11-28 Thread Marc Portier
Joe Nellis wrote: Hi Mark, *1* TransformRepresentation doesn't seem to have a way to inject xslt parameters. Am I missing it? Is there someone having a patch or opinion on how to do it? (ideas welcomed both on implementation and usage level) This is done with the JAXP convention on the

Re: Dynamic properties for Jetty connectors

2007-11-28 Thread Jerome Louvel
Hi Kevin, I propose that the server properties for the Jetty connectors be dynamically set via refllection instead of hard coding the setter calls into the Http(s)ServerHelper. As it stands now, the helper classes are prone to an arms race with Jetty because Restlet need to be updated every

Re: ConverterService architecture

2007-11-28 Thread Jason Terhune
Paul J. Lucas pauljlucas at mac.com writes: On Nov 26, 2007, at 2:33 AM, Jerome Louvel wrote: Your suggestion regarding the map of ConverterService is interesting. However, how would you handle the reverse conversion (from Representation to Object) ? Also using a map. For both

Re: ConverterService architecture

2007-11-28 Thread Kevin Conaway
You could do it via reflection: import java.lang.reflect.*; public class ConverterService { public void convert(Object o) throws Exception{ for (Method m : getClass().getDeclaredMethods()) { if (m.getName().equals(handle)) { Class? paramType =

getting all the headers of a response

2007-11-28 Thread Story Henry
I found some threads on this list on how to get the headers of a request, but as I am writing a client I am more interested in getting all the headers of a response. HTTPUrlConnection hconn = (HTTPUrlConnection) url.getURLConnection(); hconn.connect(); Bnode response =

Re: ConverterService architecture

2007-11-28 Thread Paul J. Lucas
On Nov 28, 2007, at 1:31 PM, Jason Terhune wrote: I haven't actually tried this, but couldn't you just overload the toObject() and toRepresentation() methods? Doesn't Java do the work of choosing the method with the most specific argument? For example: public class ConverterService