Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.http.client.support
Class HttpAccessor

    java.lang.Object
      org.springframework.http.client.support.HttpAccessor

Direct Known Subclasses:
  InterceptingHttpAccessor

    public abstract class HttpAccessor

extends java.lang.Object

Base class for `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`.

Since:
  3.0
Author:
  Arjen Poutsma
See Also:
  `RestTemplate`

Field Summary
`protected org.apache.commons.logging.Log` | `logger` Logger available to subclasses.

Constructor Summary
`HttpAccessor()`

Method Summary
`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`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### logger

    protected final org.apache.commons.logging.Log logger

  Logger available to subclasses.

Constructor Detail

### HttpAccessor

    public HttpAccessor()

Method Detail

### setRequestFactory

    public void setRequestFactory(ClientHttpRequestFactory requestFactory)

  Set the request factory that this accessor uses for obtaining `HttpRequests`.

### getRequestFactory

    public ClientHttpRequestFactory getRequestFactory()

  Return the request factory that this accessor uses for obtaining `HttpRequests`.

### createRequest

    protected ClientHttpRequest createRequest(java.net.URI url,
                                              HttpMethod method)
                                       throws java.io.IOException

  Create a new `ClientHttpRequest` via this template's `ClientHttpRequestFactory`.

  Parameters:
    `url` - the URL to connect to
    `method` - the HTTP method to exectute (GET, POST, etc.)
  Returns:
    the created request
  Throws:
    `java.io.IOException` - in case of I/O errors

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD