Skip to content

Conversation

@danielkec
Copy link
Contributor

@danielkec danielkec commented Jun 10, 2020

Fixes #4501
Fixes #4500

Now its possible in Java 11+

    @GET
    @Path("sse")
    @Produces(MediaType.SERVER_SENT_EVENTS)
    public void listenToEvents(@Context java.util.concurrent.Flow.Subscriber<String> eventSink)
    public void listenToEvents(@Context java.util.concurrent.Flow.Subscriber<OutboundEvent> eventSink)
    public void listenToEvents(@Context org.glassfish.jersey.internal.jsr166.Flow.Subscriber<String> eventSink)
    public void listenToEvents(@Context org.glassfish.jersey.internal.jsr166.Flow.Subscriber<OutboundEvent> eventSink)

Java 8

    @GET
    @Path("sse")
    @Produces(MediaType.SERVER_SENT_EVENTS)
    public void listenToEvents(@Context org.glassfish.jersey.internal.jsr166.Flow.Subscriber<String> eventSink)
    public void listenToEvents(@Context org.glassfish.jersey.internal.jsr166.Flow.Subscriber<OutboundEvent> eventSink)

@danielkec danielkec force-pushed the 4501-flow-subscriber-sse branch 2 times, most recently from cb3d761 to 4fec414 Compare June 11, 2020 08:49
@tomas-langer tomas-langer requested a review from jansupol June 11, 2020 09:08
@danielkec danielkec force-pushed the 4501-flow-subscriber-sse branch from 804558d to a3c9ad4 Compare June 11, 2020 18:04
@danielkec danielkec changed the title [WIP] SSE Flow.Subscriber injectable as event sink SSE Flow.Subscriber injectable as event sink Jun 11, 2020
@danielkec danielkec changed the title SSE Flow.Subscriber injectable as event sink [WIP] SSE Flow.Subscriber injectable as event sink Jun 12, 2020
@danielkec danielkec force-pushed the 4501-flow-subscriber-sse branch from a446b68 to a014999 Compare June 12, 2020 14:42
@danielkec danielkec force-pushed the 4501-flow-subscriber-sse branch 2 times, most recently from acf87ab to 58d0a4f Compare June 15, 2020 12:41
@danielkec danielkec force-pushed the 4501-flow-subscriber-sse branch 2 times, most recently from d2d7cd3 to 680068c Compare August 3, 2020 15:02
@danielkec danielkec changed the title [WIP] SSE Flow.Subscriber injectable as event sink SSE Flow.Subscriber injectable as event sink Aug 4, 2020
@danielkec danielkec requested a review from jansupol August 4, 2020 10:38
@danielkec danielkec requested a review from jansupol September 21, 2020 20:09
  * Java Flow api used only by JerseyEventSink in java 11+
  * Reactive streams tck tests for JerseyEventSink
  * Cancel on close propagation
  * Remove tests contradicting reactive streams spec https://github.com/reactive-streams/reactive-streams-jvm#2.13

Signed-off-by: Daniel Kec <daniel.kec@oracle.com>
@danielkec danielkec force-pushed the 4501-flow-subscriber-sse branch from cb5eca9 to e2ba486 Compare September 23, 2020 13:56
@danielkec
Copy link
Contributor Author

Sorry for the force push, conflicts solved ...

Copy link
Contributor

@senivam senivam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@senivam senivam merged commit 0f65e5d into eclipse-ee4j:master Sep 23, 2020
@senivam senivam added this to the 2.32 milestone Sep 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SSE Endpoint should be able to inject Flow.Subscriber JerseyEventSink shouln't throw exceptions in Flow.Subscriber methods

4 participants