final class SimpleBufferingAsyncClientHttpRequest extends AbstractBufferingAsyncClientHttpRequest
ClientHttpRequest
implementation that uses
standard JDK facilities to execute buffered requests. Created via the
SimpleClientHttpRequestFactory
.SimpleClientHttpRequestFactory.createRequest(java.net.URI, org.springframework.http.HttpMethod)
Modifier and Type | Field and Description |
---|---|
private java.net.HttpURLConnection |
connection |
private boolean |
outputStreaming |
private AsyncListenableTaskExecutor |
taskExecutor |
Constructor and Description |
---|
SimpleBufferingAsyncClientHttpRequest(java.net.HttpURLConnection connection,
boolean outputStreaming,
AsyncListenableTaskExecutor taskExecutor) |
Modifier and Type | Method and Description |
---|---|
protected ListenableFuture<ClientHttpResponse> |
executeInternal(HttpHeaders headers,
byte[] bufferedOutput)
Abstract template method that writes the given headers and content to the HTTP request.
|
HttpMethod |
getMethod()
Return the HTTP method of the request.
|
java.net.URI |
getURI()
Return the URI of the request.
|
executeInternal, getBodyInternal
assertNotExecuted, executeAsync, getBody, getHeaders
private final java.net.HttpURLConnection connection
private final boolean outputStreaming
private final AsyncListenableTaskExecutor taskExecutor
SimpleBufferingAsyncClientHttpRequest(java.net.HttpURLConnection connection, boolean outputStreaming, AsyncListenableTaskExecutor taskExecutor)
public HttpMethod getMethod()
HttpRequest
null
if not resolvable (e.g. in case of a non-standard HTTP method)public java.net.URI getURI()
HttpRequest
null
)protected ListenableFuture<ClientHttpResponse> executeInternal(HttpHeaders headers, byte[] bufferedOutput) throws java.io.IOException
AbstractBufferingAsyncClientHttpRequest
executeInternal
in class AbstractBufferingAsyncClientHttpRequest
headers
- the HTTP headersbufferedOutput
- the body contentjava.io.IOException