Support CompletableFuture as alternative to DeferredResult in MVC

Issue: SPR-12597
This commit is contained in:
Sebastien Deleuze
2015-04-20 11:48:02 +02:00
parent 72894b26c2
commit 5b0a0f4db5
4 changed files with 112 additions and 2 deletions

View File

@@ -213,6 +213,10 @@ import java.util.concurrent.Callable;
* <li>A {@link org.springframework.util.concurrent.ListenableFuture}
* which the application uses to produce a return value in a separate
* thread of its own choosing, as an alternative to returning a Callable.
* <li>A {@link java.util.concurrent.CompletionStage} (implemented by
* {@link java.util.concurrent.CompletableFuture} for example)
* which the application uses to produce a return value in a separate
* thread of its own choosing, as an alternative to returning a Callable.
* <li>A {@link org.springframework.web.servlet.mvc.method.annotation.ResponseBodyEmitter}
* can be used to write multiple objects to the response asynchronously;
* also supported as the body within {@code ResponseEntity}.</li>