|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.http.client.AbstractClientHttpRequestFactoryWrapper
org.springframework.http.client.BufferingClientHttpRequestFactory
public class BufferingClientHttpRequestFactory
Wrapper for a ClientHttpRequestFactory that buffers all outgoing and incoming streams in memory.
Using this wrapper allows for multiple reads of the response body.
| Constructor Summary | |
|---|---|
BufferingClientHttpRequestFactory(ClientHttpRequestFactory requestFactory)
|
|
| Method Summary | |
|---|---|
protected ClientHttpRequest |
createRequest(URI uri,
HttpMethod httpMethod,
ClientHttpRequestFactory requestFactory)
Create a new ClientHttpRequest for the specified URI and HTTP method by using the
passed-on request factory. |
protected boolean |
shouldBuffer(URI uri,
HttpMethod httpMethod)
Indicates whether the request/response exchange for the given URI and method should be buffered in memory. |
| Methods inherited from class org.springframework.http.client.AbstractClientHttpRequestFactoryWrapper |
|---|
createRequest |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BufferingClientHttpRequestFactory(ClientHttpRequestFactory requestFactory)
| Method Detail |
|---|
protected ClientHttpRequest createRequest(URI uri,
HttpMethod httpMethod,
ClientHttpRequestFactory requestFactory)
throws IOException
AbstractClientHttpRequestFactoryWrapperClientHttpRequest for the specified URI and HTTP method by using the
passed-on request factory.
Called from AbstractClientHttpRequestFactoryWrapper.createRequest(URI, HttpMethod).
createRequest in class AbstractClientHttpRequestFactoryWrapperuri - the URI to create a request forhttpMethod - the HTTP method to executerequestFactory - the wrapped request factory
IOException - in case of I/O errors
protected boolean shouldBuffer(URI uri,
HttpMethod httpMethod)
Default implementation returns true for all URIs and methods. Subclasses can override this method to
change this behavior.
uri - the URIhttpMethod - the method
true if the exchange should be buffered; false otherwise
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||