Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSE Flow.Subscriber injectable as event sink #4503

Merged
merged 1 commit into from
Sep 23, 2020

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
@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 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
  * 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 <[email protected]>
@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
4 participants