[jsr369-experts] Re: [servlet-spec users] Re: Adding support for obtaining post parameters asynchronously

From: Mark Thomas <markt_at_apache.org>
Date: Wed, 30 Mar 2016 09:14:39 +0100

On 07/01/2016 05:55, Greg Wilkins wrote:
> All,
> To further this discussion, here are two more fully formed interfaces
> for what I think might be suitable for parameters and multipart, with a
> bit of javadoc
> Note that I'm not proposing we change the Part API - which has a
> blocking aspect via it's input stream. However, I propose that a Part
> is only returned to the listener when it is fully read - eitehr into
> memory or into a file (as per the current configuration).
> thoughts?

Generally, +1 to the concept.

There is a lot of detail that will need to be worked out. The thoughts
that immediately spring to mind are:

1. This should only be available from async mode (like the other
non-blcoking features).

2. Only one of ReadListener, PartListener and ParameterListener is
allowed for a request.

3. Further restrictions that you can't mix blocking and non-blocking
access to Parts and Parameters in a single request.

I suspect I'll have a few more questions once I start implementing this.

This is next on my TODO list for my Servlet 4.0 work. I'll report back
as I make progress. One thing we should do as we work on this is aim to
implement the same changes to the Servlet API so folks can test it
easily. Do you have any thoughts on what those changes should be at this