Response Stream Lifetime with Continuations
When handling a request for a large response, we are using continuations. Can we take a reference to the response output stream (i.e.,
response.out()) just once, at the beginning of handling the request and then reuse the reference until the request is done? Or do we need to use the response output stream passed into the request handler for each continuation?
The interface doesn't make it clear, given that a response, and thus a response output stream, is passed into each call of the request handler. My gut would say that we should use the response output stream passed in each time, because we don't control the lifetime of the stream, but is that accurate?
No data to display