jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] Re: [jax-rs-spec users] Re: Adding SSE support to JAX-RS 2.1?

From: Markus KARG <markus_at_headcrashing.eu>
Date: Thu, 27 Mar 2014 20:00:16 +0100

>> Right... It's looking fine.
>> The only concern is the name 'ChunkedOutput' - it is not cool :-). I saw
references to it earlier, I thought it was to do with the HTTP chunked
encoding. IMHO StreamingResponse reads better, but I can drop it...

> I do not have a problem with renaming suggestion at all.

I think that renaming is actually important for unambiguously making clear
that the object returned is neither getting chunked (in the sense of chunked
transport encoding of one single entity) nor is a chunk of a larger entity
(in the sense of a already filled collection), but is an unknown and
open-ended stream providing *several* unrelated entities. That's why I think
that using the name "Stream<T>" is actually optimal, because it is 100%
clear that one complete entity of type T is returned with each single event
and the number of such events is not known at time of method termination --
not more, not less, nut chunked, not bundled. :-)

Regards
Markus