类 MockAsyncClientHttpRequest
- java.lang.Object
- org.springframework.mock.http.MockHttpOutputMessage
- org.springframework.mock.http.client.MockClientHttpRequest
- org.springframework.mock.http.client.MockAsyncClientHttpRequest
public class MockAsyncClientHttpRequest extends MockClientHttpRequest implements AsyncClientHttpRequest
An extension ofMockClientHttpRequest
that also implementsAsyncClientHttpRequest
by wrapping the response in aSettableListenableFuture
.- 从以下版本开始:
- 4.1
- 作者:
- Rossen Stoyanchev, Sam Brannen
构造器概要
构造器 构造器 说明 MockAsyncClientHttpRequest()
MockAsyncClientHttpRequest(HttpMethod httpMethod, URI uri)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 ListenableFuture<ClientHttpResponse>
executeAsync()
Execute this request asynchronously, resulting in a Future handle.从类继承的方法 org.springframework.mock.http.client.MockClientHttpRequest
execute, executeInternal, getMethod, getURI, isExecuted, setMethod, setResponse, setURI, toString
从类继承的方法 org.springframework.mock.http.MockHttpOutputMessage
getBody, getBodyAsBytes, getBodyAsString, getBodyAsString, getHeaders
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
从接口继承的方法 org.springframework.http.HttpMessage
getHeaders
从接口继承的方法 org.springframework.http.HttpOutputMessage
getBody
从接口继承的方法 org.springframework.http.HttpRequest
getMethod, getURI
构造器详细资料
MockAsyncClientHttpRequest
public MockAsyncClientHttpRequest()
MockAsyncClientHttpRequest
public MockAsyncClientHttpRequest(HttpMethod httpMethod, URI uri)
方法详细资料
executeAsync
public ListenableFuture<ClientHttpResponse> executeAsync() throws IOException
从接口复制的说明:AsyncClientHttpRequest
Execute this request asynchronously, resulting in a Future handle.ClientHttpResponse
that can be read.- 指定者:
executeAsync
在接口中AsyncClientHttpRequest
- 返回:
- the future response result of the execution
- 抛出:
IOException
- in case of I/O errors