public class JerseySseEventSource extends Object implements javax.ws.rs.sse.SseEventSource
SseEventSource
implementation.Modifier and Type | Class and Description |
---|---|
static class |
JerseySseEventSource.Builder
SseEventSource.Builder implementation. |
Modifier and Type | Method and Description |
---|---|
boolean |
close(long timeout,
TimeUnit unit) |
boolean |
isOpen() |
void |
onEvent(javax.ws.rs.sse.InboundSseEvent inboundEvent)
On event callback, invoked whenever an event is received.
|
void |
open() |
void |
register(Consumer<javax.ws.rs.sse.InboundSseEvent> onEvent) |
void |
register(Consumer<javax.ws.rs.sse.InboundSseEvent> onEvent,
Consumer<Throwable> onError) |
void |
register(Consumer<javax.ws.rs.sse.InboundSseEvent> onEvent,
Consumer<Throwable> onError,
Runnable onComplete) |
public void onEvent(javax.ws.rs.sse.InboundSseEvent inboundEvent)
inboundEvent
- received event.public void register(Consumer<javax.ws.rs.sse.InboundSseEvent> onEvent)
register
in interface javax.ws.rs.sse.SseEventSource
public void register(Consumer<javax.ws.rs.sse.InboundSseEvent> onEvent, Consumer<Throwable> onError)
register
in interface javax.ws.rs.sse.SseEventSource
public void register(Consumer<javax.ws.rs.sse.InboundSseEvent> onEvent, Consumer<Throwable> onError, Runnable onComplete)
register
in interface javax.ws.rs.sse.SseEventSource
public void open()
open
in interface javax.ws.rs.sse.SseEventSource
public boolean isOpen()
isOpen
in interface javax.ws.rs.sse.SseEventSource
public boolean close(long timeout, TimeUnit unit)
close
in interface javax.ws.rs.sse.SseEventSource
Copyright © 2007-2021, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.