final class SimpleStreamingClientHttpRequest extends AbstractClientHttpRequest
ClientHttpRequest
implementation that uses standard JDK facilities to
execute streaming requests. Created via the SimpleClientHttpRequestFactory
.SimpleClientHttpRequestFactory.createRequest(java.net.URI, HttpMethod)
Modifier and Type | Field and Description |
---|---|
private java.io.OutputStream |
body |
private int |
chunkSize |
private java.net.HttpURLConnection |
connection |
private boolean |
outputStreaming |
Constructor and Description |
---|
SimpleStreamingClientHttpRequest(java.net.HttpURLConnection connection,
int chunkSize,
boolean outputStreaming) |
Modifier and Type | Method and Description |
---|---|
protected ClientHttpResponse |
executeInternal(HttpHeaders headers)
Abstract template method that writes the given headers and content to the HTTP request.
|
protected java.io.OutputStream |
getBodyInternal(HttpHeaders headers)
Abstract template method that returns the body.
|
HttpMethod |
getMethod()
Return the HTTP method of the request.
|
java.net.URI |
getURI()
Return the URI of the request.
|
assertNotExecuted, execute, getBody, getHeaders
private final java.net.HttpURLConnection connection
private final int chunkSize
private java.io.OutputStream body
private final boolean outputStreaming
SimpleStreamingClientHttpRequest(java.net.HttpURLConnection connection, int chunkSize, boolean outputStreaming)
public HttpMethod getMethod()
HttpRequest
public java.net.URI getURI()
HttpRequest
protected java.io.OutputStream getBodyInternal(HttpHeaders headers) throws java.io.IOException
AbstractClientHttpRequest
getBodyInternal
in class AbstractClientHttpRequest
headers
- the HTTP headersjava.io.IOException
protected ClientHttpResponse executeInternal(HttpHeaders headers) throws java.io.IOException
AbstractClientHttpRequest
executeInternal
in class AbstractClientHttpRequest
headers
- the HTTP headersjava.io.IOException