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

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

From: Bill Burke <bburke_at_redhat.com>
Date: Mon, 15 Oct 2012 09:43:23 -0400

On 10/15/2012 9:39 AM, Santiago Pericas-Geertsen wrote:
>
> On Oct 15, 2012, at 9:24 AM, Bill Burke wrote:
>
>>
>>
>> On 10/15/2012 9:05 AM, Santiago Pericas-Geertsen wrote:
>>>
>>> On Oct 13, 2012, at 6:31 AM, Bill Burke wrote:
>>>
>>>>
>>>>
>>>> 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.
>>>
>>> That's an interesting point, but I think we need to clarify this a bit more. In particular, I'm not sure how StreamingOutput is supposed to work in the presence of response filters and entity interceptors.
>>>
>>> I believe in 1.X, the idea was to skip MBWs, so do we skip the entire response processing pipeline now? I'm not exactly sure how async helps in this case to be honest.
>>>
>>
>> I don't see a problem with StreamingOutput and filters/interceptors at all.
>
> Well, if the output is being streamed piecemeal, are the filters executed on every "piece"?
>
> -- Santiago
>

StreamingOutput is an entity so it would be processed like any other
Java object entity. StreamingOutput.write() can't do things piecemeal.
  It has to be finished after the method completes.


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