Description
Rossen Stoyanchev opened SPR-12212 and commented
Spring 4 SockJS support already provides an SEE transport that can be used even in browsers that don't support websocket.
The purpose of this ticket is to provide explicit support for Server-Sent Events in @RequestMapping
methods in addition to the Callable and DeferredResult return types.
At present Callable and DeferredResult provide a simple way for a controller to produce a return value asynchronously once and then resume processing. This works for any annotated controller method and supports the full range of options, i.e. @ResponseBody
or view resolution, handler interception, exception resolution, etc.
For SSE we'll need to support returning multiple values at different times. This will likely result very specifically in an HttpMessageConverter writing each value to the response.
Affects: 4.1 GA
Sub-tasks:
- Add documentation for Server-Sent Events support [SPR-12672] #17271 Add documentation for Server-Sent Events support
- Add onTimeout() and onCompletion() callbacks to ResponseBodyEmitter [SPR-12939] #17532 Add onTimeout() and onCompletion() callbacks to ResponseBodyEmitter
Issue Links:
- Support SSE / event-stream [SPR-12208] #16822 Support SSE / event-stream ("is duplicated by")
- Return type implementing DeferredResult is rejected with exception [SPR-14423] #18994 Return type implementing DeferredResult is rejected with exception
- RxJava Observable/Single and Reactor Flux/Mono as Spring MVC handler method return types [SPR-14046] #18618 RxJava Observable/Single and Reactor Flux/Mono as Spring MVC handler method return types
- HTTP Streaming Directly to the OutputStream [SPR-12831] #17428 HTTP Streaming Directly to the OutputStream
- INT-3625 Support for Server-Sent Events (SSE)
- Document how HandlerInterceptor should differentiate an ASYNC dispatch [SPR-12608] #17209 Document how HandlerInterceptor should differentiate an ASYNC dispatch
- Add request timeout to ResponseBodyEmitter [SPR-13104] #17695 Add request timeout to ResponseBodyEmitter
Referenced from: commits 935ffc5, a32b5e6
5 votes, 12 watchers