dev@jsr311.java.net

RE: JSR311: Response isn't adequate

From: Jerome Louvel <jerome.louvel_at_noelios.com>
Date: Tue, 11 Mar 2008 16:15:12 +0100

Hi Marc,

[...]

> I could see adding something along the lines of what you and Stephan
> suggested, e.g.:
>
> public interface StreamedOutput {
> void write(OutputStream o);
> }
>
> Which can be returned when you want to do streaming - the spec would
> require implementations to support this type. I'm not a huge fan of
> anonymous inner classes, but they can be useful. Given the above I
> don't see why you'd also need another way of getting an
> output stream...

+1
 
> Beyond that though I think that Response and ResponseBuilder already
> support the metadata side of Restlet's Representation class and I
> don't see the need to add more of it. A Restlet-based implementation
> could support the Restlet Representation class directly if desired.

Actually, Stephan's implementation already supports returning a Restlet
Representation instance directly.

Best regards,
Jerome Louvel