users@servlet-spec.java.net

[servlet-spec users] [jsr369-experts] Re: Re: Renaming HttpServletRequest#getPushBuilder to #newPushBuilder.

From: Shing Wai Chan <shing.wai.chan_at_oracle.com>
Date: Tue, 28 Mar 2017 17:03:12 -0700

Any comments on the following?

Shing Wai Chan

> On Mar 24, 2017, at 5:49 PM, Shing Wai Chan <shing.wai.chan_at_oracle.com> wrote:
>
> I have modified the following change locally in my workspace. The result is as follows:
> /**
> * Returns a new instance of {_at_link PushBuilder} for issuing server push
> * responses from the current request. If the current connection does not
> * support server push, or server push has been disabled by the
> * client via a {_at_code SETTINGS_ENABLE_PUSH} settings frame value of
> * {_at_code 0} (zero), it will return null.
> *
> * @implSpec
> * The default implementation returns null.
> *
> * @return a {_at_link PushBuilder} for issuing server push responses
> * from the current request.
> *
> * @since Servlet 4.0
> */
> default public PushBuilder newPushBuilder() {
> return null;
> }
>
> Now, newPushBuilder() can return null.
> Just want to make sure that it is ok to EG with this.
> Please respond by close of business Wednesday 29 March.
>
> Shing Wai Chan
>
>
>> On Mar 23, 2017, at 3:16 PM, Shing Wai Chan <shing.wai.chan_at_oracle.com> wrote:
>>
>> We had the pleasure of discussing HTTP/2 push with Simone Bordet yesterday. He suggested that we rename HttpServletRequest#getPushBuilder() to HttpServletRequest#newPushBuilder().
>>
>> This is a good idea as we have the following in javadoc of PushBuilder:
>>
>> A PushBuilder is obtained by calling HttpServletRequest.getPushBuilder(). Each call to this method will return a new instance of a PushBuilder based off the current HttpServletRequest. Any mutations to the returned PushBuilder are not reflected on future returns.
>>
>> What do you think?
>>
>> Please respond by close of business Tuseday 28 March.
>> In the absence of feedback, we'll just go with this proposal.
>>
>> Shing Wai Chan
>