Package com.jsgalactic.axiom.http
Interface EventStreamBody
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Produces a server-sent event stream (see
Response.sse(com.jsgalactic.axiom.http.EventStreamBody)). It runs like a StreamBody: once, after the head was sent, on the handler's virtual thread, holding the
admission slot and the request deadline. Returning ends the stream; an exception abandons it.-
Method Summary
-
Method Details
-
run
Sends the events.- Parameters:
events- destination, valid until this method returns- Throws:
Exception- to abandon the response
-