Package org.springframework.web.client.support

# Class RestGatewaySupport

java.lang.Object
org.springframework.web.client.support.RestGatewaySupport

public class RestGatewaySupport extends Object
Convenient superclass for application classes that need REST access.

Requires a `ClientHttpRequestFactory` or a `RestTemplate` instance to be set.

Since:
  3.0
Author:
  Arjen Poutsma
See Also:
  - `setRestTemplate(org.springframework.web.client.RestTemplate)`
  - `RestTemplate`

## Field Summary

Fields
Modifier and Type
Field
Description
`protected final org.apache.commons.logging.Log`
`logger`
Logger available to subclasses.

## Constructor Summary

Constructors
Constructor
Description
`RestGatewaySupport()`
Construct a new instance of the `RestGatewaySupport`, with default parameters.
`RestGatewaySupport(ClientHttpRequestFactory requestFactory)`
Construct a new instance of the `RestGatewaySupport`, with the given `ClientHttpRequestFactory`.

## Method Summary

Modifier and Type
Method
Description
`RestTemplate`
`getRestTemplate()`
Returns the `RestTemplate` for the gateway.
`void`
`setRestTemplate(RestTemplate restTemplate)`
Sets the `RestTemplate` for the gateway.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### logger

protected final org.apache.commons.logging.Log logger
Logger available to subclasses.

## Constructor Details

### RestGatewaySupport

public RestGatewaySupport()
Construct a new instance of the `RestGatewaySupport`, with default parameters.

### RestGatewaySupport

public RestGatewaySupport(ClientHttpRequestFactory requestFactory)
Construct a new instance of the `RestGatewaySupport`, with the given `ClientHttpRequestFactory`.

See Also:
  - `RestTemplate(ClientHttpRequestFactory)`

## Method Details

### setRestTemplate

public void setRestTemplate(RestTemplate restTemplate)
Sets the `RestTemplate` for the gateway.

### getRestTemplate

public RestTemplate getRestTemplate()
Returns the `RestTemplate` for the gateway.