接口 AsyncServerResponse
- 所有超级接口:
ServerResponse
- 所有已知实现类:
DefaultAsyncServerResponse
Asynchronous subtype of
ServerResponse that exposes the future
response.- 从以下版本开始:
- 4.0
- 作者:
- Arjen Poutsma, Harry Yang
- 另请参阅:
-
嵌套类概要
从接口继承的嵌套类/接口 cn.taketoday.web.handler.function.ServerResponse
ServerResponse.BodyBuilder, ServerResponse.Context, ServerResponse.HeadersBuilder<B extends ServerResponse.HeadersBuilder<B>>, ServerResponse.SseBuilder -
字段概要
从接口继承的字段 cn.taketoday.web.handler.function.ServerResponse
NONE_RETURN_VALUE -
方法概要
修饰符和类型方法说明block()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.从接口继承的方法 cn.taketoday.web.handler.function.ServerResponse
cookies, headers, rawStatusCode, statusCode, writeTo
-
方法详细资料
-
block
ServerResponse block()Blocks indefinitely until the future response is obtained. -
create
Create aAsyncServerResponsewith the given asynchronous response. ParameterasyncResponsecan be aCompletableFuture<ServerResponse>orPublisher<ServerResponse>(or any asynchronous producer of a singleServerResponsethat can be adapted via theReactiveAdapterRegistry).- 参数:
asyncResponse- aCompletableFuture<ServerResponse>orPublisher<ServerResponse>- 返回:
- the asynchronous response
-
create
Create 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).- 参数:
asyncResponse- aCompletableFuture<ServerResponse>orPublisher<ServerResponse>timeout- maximum time period to wait for before timing out- 返回:
- the asynchronous response
-