Package io.quarkus.vertx.web
Interface ReactiveRoutes.ServerSentEvent<T>
- Type Parameters:
T- the type of payload, use for thedatasection of the event.
- Enclosing class:
- ReactiveRoutes
public static interface ReactiveRoutes.ServerSentEvent<T>
A class allowing to customize how the server sent events are written.
The data section of the resulting event is the JSON representation of the result from data().
If event() does not return null, the event section is written with the result as value.
If id() is implemented, the id section uses this value.
-
Method Summary
-
Method Details
-
event
Theeventsection.- Returns:
- the name of the event. If
null, the written event won't have aneventsection
-
data
T data()Thedatasection.- Returns:
- the object that will be encoded to JSON. Must not be
null
-
id
default long id()Theidsection. If not implemented, an automatic id is inserted.- Returns:
- the id
-