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 customized how the server sent events are written.The
datasection of the resulting event is the JSON representation of the result fromdata(). Ifevent()does not returnnull, theeventsection is written with the result as value. Ifid()is implemented, theidsection uses this value.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Tdata()Thedatasection.default Stringevent()Theeventsection.default longid()Theidsection.
-
-
-
Method Detail
-
event
default String 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
-
-