public abstract class HttpAccessor
extends java.lang.Object
RestTemplate
and other HTTP accessing gateway helpers, defining common properties
such as the ClientHttpRequestFactory
to operate on.
Not intended to be used directly. See RestTemplate
.
RestTemplate
Modifier and Type | Field and Description |
---|---|
protected Log |
logger
Logger available to subclasses.
|
private ClientHttpRequestFactory |
requestFactory |
Constructor and Description |
---|
HttpAccessor() |
Modifier and Type | Method and Description |
---|---|
protected ClientHttpRequest |
createRequest(java.net.URI url,
HttpMethod method)
Create a new
ClientHttpRequest via this template's ClientHttpRequestFactory . |
ClientHttpRequestFactory |
getRequestFactory()
Return the request factory that this accessor uses for obtaining
HttpRequests . |
void |
setRequestFactory(ClientHttpRequestFactory requestFactory)
Set the request factory that this accessor uses for obtaining
HttpRequests . |
protected final Log logger
private ClientHttpRequestFactory requestFactory
public void setRequestFactory(ClientHttpRequestFactory requestFactory)
HttpRequests
.public ClientHttpRequestFactory getRequestFactory()
HttpRequests
.protected ClientHttpRequest createRequest(java.net.URI url, HttpMethod method) throws java.io.IOException
ClientHttpRequest
via this template's ClientHttpRequestFactory
.url
- the URL to connect tomethod
- the HTTP method to exectute (GET, POST, etc.)java.io.IOException
- in case of I/O errors