org.springframework.http.client
Class SimpleBufferingClientHttpRequest
java.lang.Object
org.springframework.http.client.AbstractClientHttpRequest
org.springframework.http.client.AbstractBufferingClientHttpRequest
org.springframework.http.client.SimpleBufferingClientHttpRequest
- All Implemented Interfaces:
- ClientHttpRequest, HttpMessage, HttpOutputMessage, HttpRequest
final class SimpleBufferingClientHttpRequest
- extends AbstractBufferingClientHttpRequest
ClientHttpRequest
implementation that uses standard J2SE facilities to execute buffered requests.
Created via the SimpleClientHttpRequestFactory
.
- Since:
- 3.0
- Author:
- Arjen Poutsma
- See Also:
SimpleClientHttpRequestFactory.createRequest(java.net.URI, HttpMethod)
Field Summary |
private java.net.HttpURLConnection |
connection
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
connection
private final java.net.HttpURLConnection connection
SimpleBufferingClientHttpRequest
SimpleBufferingClientHttpRequest(java.net.HttpURLConnection connection)
getMethod
public HttpMethod getMethod()
- Description copied from interface:
HttpRequest
- Return the HTTP method of the request.
- Returns:
- the HTTP method as an HttpMethod enum value
getURI
public java.net.URI getURI()
- Description copied from interface:
HttpRequest
- Return the URI of the request.
- Returns:
- the URI of the request
executeInternal
protected ClientHttpResponse executeInternal(HttpHeaders headers,
byte[] bufferedOutput)
throws java.io.IOException
- Description copied from class:
AbstractBufferingClientHttpRequest
- Abstract template method that writes the given headers and content to the HTTP request.
- Specified by:
executeInternal
in class AbstractBufferingClientHttpRequest
- Parameters:
headers
- the HTTP headersbufferedOutput
- the body content
- Returns:
- the response object for the executed request
- Throws:
java.io.IOException