Interface AsyncServerResponse
- All Superinterfaces:
- ServerResponse
Asynchronous subtype of 
ServerResponse that exposes the future
 response.- Since:
- 5.3.2
- Author:
- Arjen Poutsma
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.springframework.web.servlet.function.ServerResponseServerResponse.BodyBuilder, ServerResponse.Context, ServerResponse.HeadersBuilder<B extends ServerResponse.HeadersBuilder<B>>, ServerResponse.SseBuilder, ServerResponse.StreamBuilder
- 
Method SummaryModifier and TypeMethodDescriptionblock()Blocks indefinitely until the future response is obtained.static AsyncServerResponseCreate aAsyncServerResponsewith the given asynchronous response.static AsyncServerResponseCreate a (built) response with the given asynchronous response.Methods inherited from interface org.springframework.web.servlet.function.ServerResponsecookies, headers, rawStatusCode, statusCode, writeTo
- 
Method Details- 
blockServerResponse block()Blocks indefinitely until the future response is obtained.
- 
createCreate aAsyncServerResponsewith the given asynchronous response. ParameterasyncResponsecan be aCompletableFuture<ServerResponse>orPublisher<ServerResponse>(or any asynchronous producer of a singleServerResponsethat can be adapted via theReactiveAdapterRegistry).- Parameters:
- asyncResponse- a- CompletableFuture<ServerResponse>or- Publisher<ServerResponse>
- Returns:
- the asynchronous response
 
- 
createCreate a (built) response with the given asynchronous response. ParameterasyncResponsecan be aCompletableFuture<ServerResponse>orPublisher<ServerResponse>(or any asynchronous producer of a singleServerResponsethat can be adapted via theReactiveAdapterRegistry).- Parameters:
- asyncResponse- a- CompletableFuture<ServerResponse>or- Publisher<ServerResponse>
- timeout- maximum time period to wait for before timing out
- Returns:
- the asynchronous response
 
 
-