Package | Description |
---|---|
ratpack.sse |
Support for Server Sent Events.
|
Modifier and Type | Method and Description |
---|---|
Event<T> |
Event.comment(String comment)
Specify a comment to include as part of this event.
|
Event<T> |
Event.data(Function<? super T,String> function)
Sets the “data” value of the event to the return value of the given function.
|
Event<T> |
Event.data(String data)
Specify the event data for the server sent event.
|
Event<T> |
Event.event(Function<? super T,String> function)
Sets the “event” value of the event to the return value of the given function.
|
Event<T> |
Event.event(String event)
Specify the event type for the server sent event.
|
Event<T> |
Event.id(Function<? super T,String> function)
Sets the “id” value of the event to the return value of the given function.
|
Event<T> |
Event.id(String id)
Specify the event id for the server sent event.
|
Modifier and Type | Method and Description |
---|---|
Publisher<? extends Event<?>> |
ServerSentEvents.getPublisher()
The stream of events.
|
default Promise<TransformablePublisher<Event<?>>> |
ServerSentEventStreamClient.request(URI uri) |
Promise<TransformablePublisher<Event<?>>> |
ServerSentEventStreamClient.request(URI uri,
Action<? super RequestSpec> action) |
Modifier and Type | Method and Description |
---|---|
static <T> ServerSentEvents |
ServerSentEvents.serverSentEvents(Publisher<T> publisher,
Action<? super Event<T>> action)
Creates a new renderable object wrapping the event stream.
|