users@servlet-spec.java.net

[servlet-spec users] Re: PushBuilder

From: Paul Benedict <pbenedict_at_apache.org>
Date: Sat, 21 Nov 2015 09:55:03 -0600

So what is the use case for the getters? Any examples? Because whoever is
in charge of constructing of the PushBuilder has already determined and
intended what is being pushed. I don't see why they need to be queried.

Also will the builder methods throw ISE once the push() occurs?


Cheers,
Paul

On Sat, Nov 21, 2015 at 8:55 AM, Mark Thomas <markt_at_apache.org> wrote:

> On 21/11/2015 13:27, Greg Wilkins wrote:
> >
> > On 21 November 2015 at 23:57, Paul Benedict <pbenedict_at_apache.org
> > <mailto:pbenedict_at_apache.org>> wrote:
> >
> > If there was a concluding build() method (and from memory I don't
> > think there was), then I am completely on board with how the methods
> > have been designed.
> >
> >
> > There is a concluding push() method, which "produces" the actual push,
> > so this is really a builder.
> >
> >
> > Ed,
> >
> > I don't mind the noop approach either, but if others find it a problem,
> > at least the isPushSupported method makes it unnecessary.
>
> From my limited experimentation with the current API I think a
> isPushSupported() method is necessary. There is the potential for an
> application to do a lot of work to determine which resources to push and
> to construct the necessary pushes. All of that work is wasted if push is
> not supported. The application needs to be able to check if push is
> supported or not.
>
> Mark
>
>