users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: How are suspended responses usually managed?

From: Bill Burke <bburke_at_redhat.com>
Date: Sat, 13 Oct 2012 06:31:46 -0400

On 10/12/2012 4:28 PM, Santiago Pericas-Geertsen wrote:
>
> On Oct 12, 2012, at 4:10 PM, Jan Algermissen wrote:
>
>>
>> On Oct 12, 2012, at 9:54 PM, Markus KARG wrote:
>>
>>> I'm rather sure you'll be very pleased by having a look at AsyncResponse's
>>> JavaDocs (the code example in the class docs showing how to implement COMET
>>> "pushing")... ;-)
>>
>> You mean the intro of
>>
>> http://jax-rs-spec.java.net/nonav/2.0-SNAPSHOT/apidocs/javax/ws/rs/container/AsyncResponse.html
>>
>> Is that Comet? Would the browser open a new connection after receiving the push?
>
> The message reader would need a connection per message. The resume method can only be called once on a connection, so this isn't designed for HTTP streaming.
>

Sure it can support streaming. Just pass in a StreamingOutput.

Bill

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com