接口 AsyncServerResponse

所有超级接口:
ServerResponse
所有已知实现类:
DefaultAsyncServerResponse

public interface AsyncServerResponse extends ServerResponse
Asynchronous subtype of ServerResponse that exposes the future response.
从以下版本开始:
4.0
作者:
Arjen Poutsma, Harry Yang
另请参阅:
  • 方法详细资料

    • block

      Blocks indefinitely until the future response is obtained.
    • create

      static AsyncServerResponse create(Object asyncResponse)
      Create a AsyncServerResponse with the given asynchronous response. Parameter asyncResponse can be a CompletableFuture<ServerResponse> or Publisher<ServerResponse> (or any asynchronous producer of a single ServerResponse that can be adapted via the ReactiveAdapterRegistry).
      参数:
      asyncResponse - a CompletableFuture<ServerResponse> or Publisher<ServerResponse>
      返回:
      the asynchronous response
    • create

      static AsyncServerResponse create(Object asyncResponse, Duration timeout)
      Create a (built) response with the given asynchronous response. Parameter asyncResponse can be a CompletableFuture<ServerResponse> or Publisher<ServerResponse> (or any asynchronous producer of a single ServerResponse that can be adapted via the ReactiveAdapterRegistry).
      参数:
      asyncResponse - a CompletableFuture<ServerResponse> or Publisher<ServerResponse>
      timeout - maximum time period to wait for before timing out
      返回:
      the asynchronous response