Jetty has implemented a call to onAllDataRead() only once the EOF content
has been reached.
This may be the case that onDataAvailable() has been called and -1 has been
read potentially after looping on isReady(), in which case onAddDataRead()
is called only once onDataAvailable() returns.
Alternately, isReady() may have returned false and there is no thread
dispatched to onDataAvailable() and EOF arrives. In this case we call
onAllDataRead() directly (although there is a mode of thought that says we
should call onDataAvailable() first so -1 can be read).
On 10 December 2015 at 08:56, Martin Mulholland <mmulholl_at_us.ibm.com> wrote:
> Hi,
>
> the spec says:
>
> onAllDataRead(). The onAllDataRead method is invoked when you have
> finished reading all the data for the ServletRequest for which the listener
> was registered.
>
> Based on the audience of the spec the "you" should be the servlet engine
> provider. As a result this implies that OnAllDataRead should be called when
> the servlet
> engine has all of the data in hand, even though the application
> readListener may have not finished reading it yet. Therefore this would
> effectivley be a way of
> telling the readListener that isReady will now always return true.
>
> The more logical use of onAllDataRead() is to call it after the
> readListener has finished reading all of the data as a way for the
> readListener to start ant processing
> which requires all data to be read.
>
> Which is correct?
>
> Also "you" is used in several space in the spec and it appears to
> inconsistent, should probably clean these up to be clear.
>
> Thank you,
> Martin Mulholland.
> WebSphere Application Server Web Tier Architect
> email: mmulholl_at_us.ibm.com
>
> IBM RTP, PO BOX 12195, 503/C227,
> 3039 Cornwallis Rd, RTP, NC 27709-2195
> t/l 444-4319, external (919)-254-4319
>
>
--
Greg Wilkins <gregw@webtide.com> CTO http://webtide.com