public class JerseySseEventSource extends Object implements 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(InboundSseEvent inboundEvent)
On event callback, invoked whenever an event is received.
|
void |
open() |
void |
register(Consumer<InboundSseEvent> onEvent) |
void |
register(Consumer<InboundSseEvent> onEvent,
Consumer<Throwable> onError) |
void |
register(Consumer<InboundSseEvent> onEvent,
Consumer<Throwable> onError,
Runnable onComplete) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, target
public void onEvent(InboundSseEvent inboundEvent)
inboundEvent
- received event.public void register(Consumer<InboundSseEvent> onEvent)
register
in interface SseEventSource
public void register(Consumer<InboundSseEvent> onEvent, Consumer<Throwable> onError)
register
in interface SseEventSource
public void register(Consumer<InboundSseEvent> onEvent, Consumer<Throwable> onError, Runnable onComplete)
register
in interface SseEventSource
public void open()
open
in interface SseEventSource
public boolean isOpen()
isOpen
in interface SseEventSource
public boolean close(long timeout, TimeUnit unit)
close
in interface SseEventSource
Copyright © 2007-2024, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.