Example usage for Java org.springframework.web.servlet.mvc.method.annotation SseEmitter fields, constructors, methods, implement or subclass
The text is from its open source code.
SseEmitter() Create a new SseEmitter instance. | |
SseEmitter(Long timeout) Create a SseEmitter with a custom timeout value. |
void | complete() Complete request processing by performing a dispatch into the servlet container, where Spring MVC is invoked once more, and completes the request processing lifecycle. |
void | completeWithError(Throwable ex) Complete request processing with an error. |
void | onCompletion(Runnable callback) Register code to invoke when the async request completes. |
void | onTimeout(Runnable callback) Register code to invoke when the async request times out. |
void | send(Object object) Send the object formatted as a single SSE "data" line. |
void | send(SseEventBuilder builder) Send an SSE event prepared with the given builder. |
void | send(Object object, @Nullable MediaType mediaType) Send the object formatted as a single SSE "data" line. |