users@servlet-spec.java.net

[servlet-spec users] PushBuilder

From: <pbenedict_at_apache.org>
Date: Wed, 18 Nov 2015 23:01:50 +0000 (UTC)

My initial impression of PushBuilder:

* I find it a surprising choice to make it a default method that always
returns an instance. This is very confusing, IMO, because the
connection may not support the feature -- which clearly begs the
question why (1) instantiate anything and (2) return an object that
does nothing?

* Is it wise for a spec to provide server implementation classes? I
don't think this precedent should be set. That was clearly the purpose
for introducing NoOpPushBuilder.

* The docs talk about "If the current connection does not support
server push", but there is no way to query for that fact.

* The methods like "etag" and "path" are truly setters, not operations.
I think prefixing them with "set" should be considered... and returning
"void" to keep the bean spec.