Package | Description |
---|---|
ratpack.sse |
Modifier and Type | Method and Description |
---|---|
ServerSentEvents.Event<T> |
ServerSentEvents.Event.data(Function<? super T,String> function)
Sets the “data” value of the event to the return value of the given function.
|
ServerSentEvents.Event<T> |
ServerSentEvents.Event.data(String data)
Specify the event data for the server sent event.
|
ServerSentEvents.Event<T> |
ServerSentEvents.Event.event(Function<? super T,String> function)
Sets the “event” value of the event to the return value of the given function.
|
ServerSentEvents.Event<T> |
ServerSentEvents.Event.event(String event)
Specify the event type for the server sent event.
|
ServerSentEvents.Event<T> |
ServerSentEvents.Event.id(Function<? super T,String> function)
Sets the “id” value of the event to the return value of the given function.
|
ServerSentEvents.Event<T> |
ServerSentEvents.Event.id(String id)
Specify the event id for the server sent event.
|
Modifier and Type | Method and Description |
---|---|
org.reactivestreams.Publisher<? extends ServerSentEvents.Event<?>> |
ServerSentEvents.getPublisher()
The stream of events.
|
Modifier and Type | Method and Description |
---|---|
static <T> ServerSentEvents |
ServerSentEvents.serverSentEvents(org.reactivestreams.Publisher<T> publisher,
Action<? super ServerSentEvents.Event<T>> action)
Creates a new renderable object wrapping the event stream.
|