public class MockAsyncClientHttpRequest extends MockClientHttpRequest implements AsyncClientHttpRequest
MockClientHttpRequest
that also implements
AsyncClientHttpRequest
by wrapping the response in a
SettableListenableFuture
.Constructor and Description |
---|
MockAsyncClientHttpRequest() |
MockAsyncClientHttpRequest(HttpMethod httpMethod,
URI uri) |
Modifier and Type | Method and Description |
---|---|
ListenableFuture<ClientHttpResponse> |
executeAsync()
Execute this request asynchronously, resulting in a Future handle.
|
execute, executeInternal, getMethod, getURI, isExecuted, setMethod, setResponse, setURI, toString
getBody, getBodyAsBytes, getBodyAsString, getBodyAsString, getHeaders
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getMethod, getURI
getBody
getHeaders
public MockAsyncClientHttpRequest()
public MockAsyncClientHttpRequest(HttpMethod httpMethod, URI uri)
public ListenableFuture<ClientHttpResponse> executeAsync() throws IOException
AsyncClientHttpRequest
ClientHttpResponse
that can be read.executeAsync
in interface AsyncClientHttpRequest
IOException
- in case of I/O errors