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,
java.net.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, java.net.URI uri)
public ListenableFuture<ClientHttpResponse> executeAsync() throws java.io.IOException
AsyncClientHttpRequest
ClientHttpResponse
that can be read.executeAsync
in interface AsyncClientHttpRequest
java.io.IOException
- in case of I/O errors