接口 AsyncClientHttpRequest
- 所有超级接口:
HttpMessage
,HttpOutputMessage
,HttpRequest
- 所有已知实现类:
MockAsyncClientHttpRequest
public interface AsyncClientHttpRequest extends HttpRequest, HttpOutputMessage
Represents a client-side asynchronous HTTP request. Created via an implementation of theAsyncClientHttpRequestFactory
.A
AsyncHttpRequest
can be executed, getting a futureClientHttpResponse
which can be read from.- 从以下版本开始:
- 4.0
- 作者:
- Arjen Poutsma
- 另请参阅:
AsyncClientHttpRequestFactory.createAsyncRequest(java.net.URI, org.springframework.http.HttpMethod)
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 ListenableFuture<ClientHttpResponse>
executeAsync()
Execute this request asynchronously, resulting in a Future handle.从接口继承的方法 org.springframework.http.HttpMessage
getHeaders
从接口继承的方法 org.springframework.http.HttpOutputMessage
getBody
从接口继承的方法 org.springframework.http.HttpRequest
getMethod, getURI
方法详细资料
executeAsync
ListenableFuture<ClientHttpResponse> executeAsync() throws IOException
Execute this request asynchronously, resulting in a Future handle.ClientHttpResponse
that can be read.- 返回:
- the future response result of the execution
- 抛出:
IOException
- in case of I/O errors