jsr369-experts@servlet-spec.java.net

[jsr369-experts] Re: [servlet-spec users] Re: HTTP Push, URI and header mutations

From: 정의근 <Eugene>
Date: Tue, 9 Dec 2014 10:40:13 +0900

+1.
It is consistent with the former APIs like isAsyncSupported() and
startAsync() with ISE.


Best regards,
Eugene Chung (Korean : 정의근)

On Tue, Dec 9, 2014 at 5:42 AM, Edward Burns <edward.burns_at_oracle.com>
wrote:

> >>>>> On Fri, 5 Dec 2014 11:52:01 +0100, Greg Wilkins <gregw_at_intalio.com>
> said:
>
> GW> I've been working with Push a little bit more and have an alternative
> GW> proposal for the API.
>
> Well, I'm sorry to see the simplicity of the existing API have to give
> way to something that seems to be starting to get quite complex.
>
> GW> I've started work on this, but thought I'd seek some feedback before I
> GW> commit too much effort. The idea is that often there will be many
> GW> resources to push and that a lot of the work needed to work out
> headers,
> GW> sessions and cookies is common to all the pushes. So we need a new
> GW> PushBuilder instance that does all this work once. We would obtain a
> GW> PushBuilder from a new method on the request:
>
> GW> /** Get a PushBuilder associated with this request initialized as
> GW> follows:<ul>
> GW> * <li>The method is initialized to "GET"</li>
>
> If we obtain the PushBuilder from the current request, then why would
> the method not be taken on from the existing request?
>
> [...]
>
> GW> * <p>Each call to getPushBuilder() will return a new instance
> GW> * of a PushBuilder based off this Request. Any mutations to the
> GW> * returned PushBuilder are not reflected on future returns.
> GW> * @return A new PushBuilder or null if push is not supported
> GW> */
> GW> public PushBuilder getPushBuilder()
>
> I to prefer the isPushSupported() method. I think calling
> getPushBuilder() should throw IllegalStateException if push is not
> supported.
>
> Ed
>
> --
> | edward.burns_at_oracle.com | office: +1 407 458 0017
> | 56 days til DevNexus 2015
> | 66 days til JavaLand 2015
> | 76 days til CONFESS 2015
>