[jax-rs-spec users] Re: Server-Sent Events API proposal

From: Alessio Soldano <>
Date: Wed, 1 Feb 2017 15:29:09 +0100

Il 24/01/2017 20:54, Pavel Bucek ha scritto:
> The API was introduced a while back [1], but we did incorporate some
> changes, mostly alignments with Java SE 8 and another one, slightly
> more controversial - alignment with Java SE 9 Flow API.
> Why we should use Flow API? We want to make the transition to Java 9
> as smooth as possible. Please note that today, the JAX-RS sources do
> contain Flow class (1:1 copy from Java SE 9), but that is NOT a final
> state. We want to work with it as much as possible, but we will
> minimize and clean up the code before final release. How? Consider
> following example:
> public interface SseBroadcasterextends AutoCloseable, Flow.Publisher<OutboundSseEvent> {
> //...
> }
> could be modified to
> public interface SseBroadcasterextends AutoCloseable {
> //...
> void subscribe(SseSubscriber<?super OutboundSseEvent> subscriber);
> }
> I hope you will like the attempt to be "forward-compatible", but I
> assume that this proposal alone will bring some opinions - please
> share them!
Just as a confirmation, so basically the idea is to keep this copy of
the Flow api in jaxrs api snapshots for now to prove we'll eventually be
able to use the real Flow interface from java 9 and actually modify the
jaxrs api (removing the Flow copy, etc) just before going final?

Besides that, as a general feedback, I think the latest additions to the
sse api are fine.