WebClient@Deprecated public class AsyncRestTemplate extends InterceptingAsyncHttpAccessor implements AsyncRestOperations
RestTemplate, but returns ListenableFuture
 wrappers as opposed to concrete results.
 The AsyncRestTemplate exposes a synchronous RestTemplate via the
 getRestOperations() method and shares its error handler
 and message converters with that RestTemplate.
 
Note: by default AsyncRestTemplate relies on
 standard JDK facilities to establish HTTP connections. You can switch to use
 a different HTTP library such as Apache HttpComponents, Netty, and OkHttp by
 using a constructor accepting an AsyncClientHttpRequestFactory.
 
For more information, please refer to the RestTemplate API documentation.
RestTemplatelogger| Constructor and Description | 
|---|
| AsyncRestTemplate()Deprecated.  Create a new instance of the  AsyncRestTemplateusing default settings. | 
| AsyncRestTemplate(AsyncClientHttpRequestFactory asyncRequestFactory)Deprecated.  Create a new instance of the  AsyncRestTemplateusing the givenAsyncClientHttpRequestFactory. | 
| AsyncRestTemplate(AsyncClientHttpRequestFactory asyncRequestFactory,
                 ClientHttpRequestFactory syncRequestFactory)Deprecated.  Creates a new instance of the  AsyncRestTemplateusing the given
 asynchronous and synchronous request factories. | 
| AsyncRestTemplate(AsyncClientHttpRequestFactory requestFactory,
                 RestTemplate restTemplate)Deprecated.  Create a new instance of the  AsyncRestTemplateusing the givenAsyncClientHttpRequestFactoryand synchronousRestTemplate. | 
| AsyncRestTemplate(AsyncListenableTaskExecutor taskExecutor)Deprecated.  Create a new instance of the  AsyncRestTemplateusing the givenAsyncTaskExecutor. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected <T> AsyncRequestCallback | acceptHeaderRequestCallback(Class<T> responseType)Deprecated.  Returns a request callback implementation that prepares the request  Acceptheaders based on the given response type and configured message converters. | 
| ListenableFuture<?> | delete(String url,
      Map<String,?> uriVariables)Deprecated.  Asynchronously delete the resources at the specified URI. | 
| ListenableFuture<?> | delete(String url,
      Object... uriVariables)Deprecated.  Asynchronously delete the resources at the specified URI. | 
| ListenableFuture<?> | delete(URI url)Deprecated.  Asynchronously delete the resources at the specified URI. | 
| protected <T> ListenableFuture<T> | doExecute(URI url,
         HttpMethod method,
         AsyncRequestCallback requestCallback,
         ResponseExtractor<T> responseExtractor)Deprecated.  Execute the given method on the provided URI. | 
| <T> ListenableFuture<ResponseEntity<T>> | exchange(String url,
        HttpMethod method,
        HttpEntity<?> requestEntity,
        Class<T> responseType,
        Map<String,?> uriVariables)Deprecated.  Asynchronously execute the HTTP method to the given URI template, writing the
 given request entity to the request, and returns the response as
  ResponseEntity. | 
| <T> ListenableFuture<ResponseEntity<T>> | exchange(String url,
        HttpMethod method,
        HttpEntity<?> requestEntity,
        Class<T> responseType,
        Object... uriVariables)Deprecated.  Asynchronously execute the HTTP method to the given URI template, writing the
 given request entity to the request, and returns the response as
  ResponseEntity. | 
| <T> ListenableFuture<ResponseEntity<T>> | exchange(String url,
        HttpMethod method,
        HttpEntity<?> requestEntity,
        ParameterizedTypeReference<T> responseType,
        Map<String,?> uriVariables)Deprecated.  Asynchronously execute the HTTP method to the given URI template, writing the given
 request entity to the request, and returns the response as  ResponseEntity. | 
| <T> ListenableFuture<ResponseEntity<T>> | exchange(String url,
        HttpMethod method,
        HttpEntity<?> requestEntity,
        ParameterizedTypeReference<T> responseType,
        Object... uriVariables)Deprecated.  Asynchronously execute the HTTP method to the given URI template, writing the given
 request entity to the request, and returns the response as  ResponseEntity. | 
| <T> ListenableFuture<ResponseEntity<T>> | exchange(URI url,
        HttpMethod method,
        HttpEntity<?> requestEntity,
        Class<T> responseType)Deprecated.  Asynchronously execute the HTTP method to the given URI template, writing the
 given request entity to the request, and returns the response as
  ResponseEntity. | 
| <T> ListenableFuture<ResponseEntity<T>> | exchange(URI url,
        HttpMethod method,
        HttpEntity<?> requestEntity,
        ParameterizedTypeReference<T> responseType)Deprecated.  Asynchronously execute the HTTP method to the given URI template, writing the given
 request entity to the request, and returns the response as  ResponseEntity. | 
| <T> ListenableFuture<T> | execute(String url,
       HttpMethod method,
       AsyncRequestCallback requestCallback,
       ResponseExtractor<T> responseExtractor,
       Map<String,?> uriVariables)Deprecated.  Asynchronously execute the HTTP method to the given URI template, preparing the
 request with the  AsyncRequestCallback, and reading the response with aResponseExtractor. | 
| <T> ListenableFuture<T> | execute(String url,
       HttpMethod method,
       AsyncRequestCallback requestCallback,
       ResponseExtractor<T> responseExtractor,
       Object... uriVariables)Deprecated.  Asynchronously execute the HTTP method to the given URI template, preparing the
 request with the  AsyncRequestCallback, and reading the response with aResponseExtractor. | 
| <T> ListenableFuture<T> | execute(URI url,
       HttpMethod method,
       AsyncRequestCallback requestCallback,
       ResponseExtractor<T> responseExtractor)Deprecated.  Asynchronously execute the HTTP method to the given URL, preparing the request
 with the  AsyncRequestCallback, and reading the response with aResponseExtractor. | 
| ResponseErrorHandler | getErrorHandler()Deprecated.  Return the error handler. | 
| <T> ListenableFuture<ResponseEntity<T>> | getForEntity(String url,
            Class<T> responseType,
            Map<String,?> uriVariables)Deprecated.  Asynchronously retrieve a representation by doing a GET on the URI template. | 
| <T> ListenableFuture<ResponseEntity<T>> | getForEntity(String url,
            Class<T> responseType,
            Object... uriVariables)Deprecated.  Asynchronously retrieve an entity by doing a GET on the specified URL. | 
| <T> ListenableFuture<ResponseEntity<T>> | getForEntity(URI url,
            Class<T> responseType)Deprecated.  Asynchronously retrieve a representation by doing a GET on the URL. | 
| List<HttpMessageConverter<?>> | getMessageConverters()Deprecated.  Return the message body converters. | 
| RestOperations | getRestOperations()Deprecated.  Expose the synchronous Spring RestTemplate to allow synchronous invocation. | 
| UriTemplateHandler | getUriTemplateHandler()Deprecated.  Return the configured URI template handler. | 
| protected ResponseExtractor<HttpHeaders> | headersExtractor()Deprecated.  Returns a response extractor for  HttpHeaders. | 
| ListenableFuture<HttpHeaders> | headForHeaders(String url,
              Map<String,?> uriVariables)Deprecated.  Asynchronously retrieve all headers of the resource specified by the URI template. | 
| ListenableFuture<HttpHeaders> | headForHeaders(String url,
              Object... uriVariables)Deprecated.  Asynchronously retrieve all headers of the resource specified by the URI template. | 
| ListenableFuture<HttpHeaders> | headForHeaders(URI url)Deprecated.  Asynchronously retrieve all headers of the resource specified by the URL. | 
| protected <T> AsyncRequestCallback | httpEntityCallback(HttpEntity<T> requestBody)Deprecated.  Returns a request callback implementation that writes the given object to the
 request stream. | 
| protected <T> AsyncRequestCallback | httpEntityCallback(HttpEntity<T> request,
                  Type responseType)Deprecated.  Returns a request callback implementation that writes the given object to the
 request stream. | 
| ListenableFuture<Set<HttpMethod>> | optionsForAllow(String url,
               Map<String,?> uriVars)Deprecated.  Asynchronously return the value of the Allow header for the given URI. | 
| ListenableFuture<Set<HttpMethod>> | optionsForAllow(String url,
               Object... uriVars)Deprecated.  Asynchronously return the value of the Allow header for the given URI. | 
| ListenableFuture<Set<HttpMethod>> | optionsForAllow(URI url)Deprecated.  Asynchronously return the value of the Allow header for the given URL. | 
| <T> ListenableFuture<ResponseEntity<T>> | postForEntity(String url,
             HttpEntity<?> request,
             Class<T> responseType,
             Map<String,?> uriVariables)Deprecated.  Create a new resource by POSTing the given object to the URI template,
 and asynchronously returns the response as  ResponseEntity. | 
| <T> ListenableFuture<ResponseEntity<T>> | postForEntity(String url,
             HttpEntity<?> request,
             Class<T> responseType,
             Object... uriVariables)Deprecated.  Create a new resource by POSTing the given object to the URI template,
 and asynchronously returns the response as  ResponseEntity. | 
| <T> ListenableFuture<ResponseEntity<T>> | postForEntity(URI url,
             HttpEntity<?> request,
             Class<T> responseType)Deprecated.  Create a new resource by POSTing the given object to the URL,
 and asynchronously returns the response as  ResponseEntity. | 
| ListenableFuture<URI> | postForLocation(String url,
               HttpEntity<?> request,
               Map<String,?> uriVars)Deprecated.  Create a new resource by POSTing the given object to the URI template, and
 asynchronously returns the value of the  Locationheader. | 
| ListenableFuture<URI> | postForLocation(String url,
               HttpEntity<?> request,
               Object... uriVars)Deprecated.  Create a new resource by POSTing the given object to the URI template, and
 asynchronously returns the value of the  Locationheader. | 
| ListenableFuture<URI> | postForLocation(URI url,
               HttpEntity<?> request)Deprecated.  Create a new resource by POSTing the given object to the URL, and asynchronously
 returns the value of the  Locationheader. | 
| ListenableFuture<?> | put(String url,
   HttpEntity<?> request,
   Map<String,?> uriVars)Deprecated.  Creates a new resource by PUTting the given object to URI template. | 
| ListenableFuture<?> | put(String url,
   HttpEntity<?> request,
   Object... uriVars)Deprecated.  Create or update a resource by PUTting the given object to the URI. | 
| ListenableFuture<?> | put(URI url,
   HttpEntity<?> request)Deprecated.  Creates a new resource by PUTting the given object to URL. | 
| protected <T> ResponseExtractor<ResponseEntity<T>> | responseEntityExtractor(Type responseType)Deprecated.  Returns a response extractor for  ResponseEntity. | 
| void | setDefaultUriVariables(Map<String,?> defaultUriVariables)Deprecated.  Configure default URI variable values. | 
| void | setErrorHandler(ResponseErrorHandler errorHandler)Deprecated.  Set the error handler. | 
| void | setMessageConverters(List<HttpMessageConverter<?>> messageConverters)Deprecated.  Set the message body converters to use. | 
| void | setUriTemplateHandler(UriTemplateHandler handler)Deprecated.  This property has the same purpose as the corresponding property on the
  RestTemplate. | 
getAsyncRequestFactory, getInterceptors, setInterceptorscreateAsyncRequest, setAsyncRequestFactorypublic AsyncRestTemplate()
AsyncRestTemplate using default settings.
 This constructor uses a SimpleClientHttpRequestFactory in combination
 with a SimpleAsyncTaskExecutor for asynchronous execution.
public AsyncRestTemplate(AsyncListenableTaskExecutor taskExecutor)
AsyncRestTemplate using the given
 AsyncTaskExecutor.
 This constructor uses a SimpleClientHttpRequestFactory in combination
 with the given AsyncTaskExecutor for asynchronous execution.
public AsyncRestTemplate(AsyncClientHttpRequestFactory asyncRequestFactory)
AsyncRestTemplate using the given
 AsyncClientHttpRequestFactory.
 This constructor will cast the given asynchronous
 AsyncClientHttpRequestFactory to a ClientHttpRequestFactory. Since
 all implementations of ClientHttpRequestFactory provided in Spring also
 implement AsyncClientHttpRequestFactory, this should not result in a
 ClassCastException.
public AsyncRestTemplate(AsyncClientHttpRequestFactory asyncRequestFactory, ClientHttpRequestFactory syncRequestFactory)
AsyncRestTemplate using the given
 asynchronous and synchronous request factories.asyncRequestFactory - the asynchronous request factorysyncRequestFactory - the synchronous request factorypublic AsyncRestTemplate(AsyncClientHttpRequestFactory requestFactory, RestTemplate restTemplate)
AsyncRestTemplate using the given
 AsyncClientHttpRequestFactory and synchronous RestTemplate.requestFactory - the asynchronous request factory to userestTemplate - the synchronous template to usepublic void setErrorHandler(ResponseErrorHandler errorHandler)
By default, AsyncRestTemplate uses a
 DefaultResponseErrorHandler.
public ResponseErrorHandler getErrorHandler()
public void setDefaultUriVariables(Map<String,?> defaultUriVariables)
DefaultUriTemplateHandler handler = new DefaultUriTemplateHandler(); handler.setDefaultUriVariables(...); AsyncRestTemplate restTemplate = new AsyncRestTemplate(); restTemplate.setUriTemplateHandler(handler);
defaultUriVariables - the default URI variable valuespublic void setUriTemplateHandler(UriTemplateHandler handler)
RestTemplate. For more details see
 RestTemplate.setUriTemplateHandler(org.springframework.web.util.UriTemplateHandler).handler - the URI template handler to usepublic UriTemplateHandler getUriTemplateHandler()
public RestOperations getRestOperations()
AsyncRestOperationsgetRestOperations in interface AsyncRestOperationspublic void setMessageConverters(List<HttpMessageConverter<?>> messageConverters)
These converters are used to convert from and to HTTP requests and responses.
public List<HttpMessageConverter<?>> getMessageConverters()
public <T> ListenableFuture<ResponseEntity<T>> getForEntity(String url, Class<T> responseType, Object... uriVariables) throws RestClientException
AsyncRestOperationsResponseEntity.
 URI Template variables are expanded using the given URI variables, if any.
getForEntity in interface AsyncRestOperationsurl - the URLresponseType - the type of the return valueuriVariables - the variables to expand the templateFutureRestClientExceptionpublic <T> ListenableFuture<ResponseEntity<T>> getForEntity(String url, Class<T> responseType, Map<String,?> uriVariables) throws RestClientException
AsyncRestOperationsResponseEntity.
 URI Template variables are expanded using the given map.
getForEntity in interface AsyncRestOperationsurl - the URLresponseType - the type of the return valueuriVariables - the map containing variables for the URI templateFutureRestClientExceptionpublic <T> ListenableFuture<ResponseEntity<T>> getForEntity(URI url, Class<T> responseType) throws RestClientException
AsyncRestOperationsResponseEntity.getForEntity in interface AsyncRestOperationsurl - the URLresponseType - the type of the return valueFutureRestClientExceptionpublic ListenableFuture<HttpHeaders> headForHeaders(String url, Object... uriVariables) throws RestClientException
AsyncRestOperationsURI Template variables are expanded using the given URI variables, if any.
headForHeaders in interface AsyncRestOperationsurl - the URLuriVariables - the variables to expand the templateFutureRestClientExceptionpublic ListenableFuture<HttpHeaders> headForHeaders(String url, Map<String,?> uriVariables) throws RestClientException
AsyncRestOperationsURI Template variables are expanded using the given map.
headForHeaders in interface AsyncRestOperationsurl - the URLuriVariables - the map containing variables for the URI templateFutureRestClientExceptionpublic ListenableFuture<HttpHeaders> headForHeaders(URI url) throws RestClientException
AsyncRestOperationsheadForHeaders in interface AsyncRestOperationsurl - the URLFutureRestClientExceptionpublic ListenableFuture<URI> postForLocation(String url, @Nullable HttpEntity<?> request, Object... uriVars) throws RestClientException
AsyncRestOperationsLocation header. This header
 typically indicates where the new resource is stored.
 URI Template variables are expanded using the given URI variables, if any.
postForLocation in interface AsyncRestOperationsurl - the URLrequest - the Object to be POSTed (may be null)uriVars - the variables to expand the templateLocation header wrapped in a FutureRestClientExceptionHttpEntitypublic ListenableFuture<URI> postForLocation(String url, @Nullable HttpEntity<?> request, Map<String,?> uriVars) throws RestClientException
AsyncRestOperationsLocation header. This header
 typically indicates where the new resource is stored.
 URI Template variables are expanded using the given map.
postForLocation in interface AsyncRestOperationsurl - the URLrequest - the Object to be POSTed (may be null)uriVars - the variables to expand the templateLocation header wrapped in a FutureRestClientExceptionHttpEntitypublic ListenableFuture<URI> postForLocation(URI url, @Nullable HttpEntity<?> request) throws RestClientException
AsyncRestOperationsLocation header. This header typically indicates
 where the new resource is stored.postForLocation in interface AsyncRestOperationsurl - the URLrequest - the Object to be POSTed (may be null)Location header wrapped in a FutureRestClientExceptionHttpEntitypublic <T> ListenableFuture<ResponseEntity<T>> postForEntity(String url, @Nullable HttpEntity<?> request, Class<T> responseType, Object... uriVariables) throws RestClientException
AsyncRestOperationsResponseEntity.
 URI Template variables are expanded using the given URI variables, if any.
postForEntity in interface AsyncRestOperationsurl - the URLrequest - the Object to be POSTed (may be null)uriVariables - the variables to expand the templateFutureRestClientExceptionHttpEntitypublic <T> ListenableFuture<ResponseEntity<T>> postForEntity(String url, @Nullable HttpEntity<?> request, Class<T> responseType, Map<String,?> uriVariables) throws RestClientException
AsyncRestOperationsResponseEntity.
 URI Template variables are expanded using the given map.
postForEntity in interface AsyncRestOperationsurl - the URLrequest - the Object to be POSTed (may be null)uriVariables - the variables to expand the templateFutureRestClientExceptionHttpEntitypublic <T> ListenableFuture<ResponseEntity<T>> postForEntity(URI url, @Nullable HttpEntity<?> request, Class<T> responseType) throws RestClientException
AsyncRestOperationsResponseEntity.postForEntity in interface AsyncRestOperationsurl - the URLrequest - the Object to be POSTed (may be null)FutureRestClientExceptionHttpEntitypublic ListenableFuture<?> put(String url, @Nullable HttpEntity<?> request, Object... uriVars) throws RestClientException
AsyncRestOperationsURI Template variables are expanded using the given URI variables, if any.
The Future will return a null result upon completion.
put in interface AsyncRestOperationsurl - the URLrequest - the Object to be PUT (may be null)uriVars - the variables to expand the templateRestClientExceptionHttpEntitypublic ListenableFuture<?> put(String url, @Nullable HttpEntity<?> request, Map<String,?> uriVars) throws RestClientException
AsyncRestOperationsURI Template variables are expanded using the given map.
The Future will return a null result upon completion.
put in interface AsyncRestOperationsurl - the URLrequest - the Object to be PUT (may be null)uriVars - the variables to expand the templateRestClientExceptionHttpEntitypublic ListenableFuture<?> put(URI url, @Nullable HttpEntity<?> request) throws RestClientException
AsyncRestOperationsThe Future will return a null result upon completion.
put in interface AsyncRestOperationsurl - the URLrequest - the Object to be PUT (may be null)RestClientExceptionHttpEntitypublic ListenableFuture<?> delete(String url, Object... uriVariables) throws RestClientException
AsyncRestOperationsURI Template variables are expanded using the given URI variables, if any.
The Future will return a null result upon completion.
delete in interface AsyncRestOperationsurl - the URLuriVariables - the variables to expand in the templateRestClientExceptionpublic ListenableFuture<?> delete(String url, Map<String,?> uriVariables) throws RestClientException
AsyncRestOperationsURI Template variables are expanded using the given URI variables, if any.
The Future will return a null result upon completion.
delete in interface AsyncRestOperationsurl - the URLuriVariables - the variables to expand in the templateRestClientExceptionpublic ListenableFuture<?> delete(URI url) throws RestClientException
AsyncRestOperationsURI Template variables are expanded using the given URI variables, if any.
The Future will return a null result upon completion.
delete in interface AsyncRestOperationsurl - the URLRestClientExceptionpublic ListenableFuture<Set<HttpMethod>> optionsForAllow(String url, Object... uriVars) throws RestClientException
AsyncRestOperationsURI Template variables are expanded using the given URI variables, if any.
optionsForAllow in interface AsyncRestOperationsurl - the URLuriVars - the variables to expand in the templateFutureRestClientExceptionpublic ListenableFuture<Set<HttpMethod>> optionsForAllow(String url, Map<String,?> uriVars) throws RestClientException
AsyncRestOperationsURI Template variables are expanded using the given map.
optionsForAllow in interface AsyncRestOperationsurl - the URLuriVars - the variables to expand in the templateFutureRestClientExceptionpublic ListenableFuture<Set<HttpMethod>> optionsForAllow(URI url) throws RestClientException
AsyncRestOperationsoptionsForAllow in interface AsyncRestOperationsurl - the URLFutureRestClientExceptionpublic <T> ListenableFuture<ResponseEntity<T>> exchange(String url, HttpMethod method, @Nullable HttpEntity<?> requestEntity, Class<T> responseType, Object... uriVariables) throws RestClientException
AsyncRestOperationsResponseEntity.
 URI Template variables are expanded using the given URI variables, if any.
exchange in interface AsyncRestOperationsurl - the URLmethod - the HTTP method (GET, POST, etc)requestEntity - the entity (headers and/or body) to write to the request
 (may be null)responseType - the type of the return valueuriVariables - the variables to expand in the templateFutureRestClientExceptionpublic <T> ListenableFuture<ResponseEntity<T>> exchange(String url, HttpMethod method, @Nullable HttpEntity<?> requestEntity, Class<T> responseType, Map<String,?> uriVariables) throws RestClientException
AsyncRestOperationsResponseEntity.
 URI Template variables are expanded using the given URI variables, if any.
exchange in interface AsyncRestOperationsurl - the URLmethod - the HTTP method (GET, POST, etc)requestEntity - the entity (headers and/or body) to write to the request
 (may be null)responseType - the type of the return valueuriVariables - the variables to expand in the templateFutureRestClientExceptionpublic <T> ListenableFuture<ResponseEntity<T>> exchange(URI url, HttpMethod method, @Nullable HttpEntity<?> requestEntity, Class<T> responseType) throws RestClientException
AsyncRestOperationsResponseEntity.exchange in interface AsyncRestOperationsurl - the URLmethod - the HTTP method (GET, POST, etc)requestEntity - the entity (headers and/or body) to write to the request
 (may be null)responseType - the type of the return valueFutureRestClientExceptionpublic <T> ListenableFuture<ResponseEntity<T>> exchange(String url, HttpMethod method, @Nullable HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType, Object... uriVariables) throws RestClientException
AsyncRestOperationsResponseEntity.
 The given ParameterizedTypeReference is used to pass generic type
 information:
 
 ParameterizedTypeReference<List<MyBean>> myBean =
     new ParameterizedTypeReference<List<MyBean>>() {};
 ResponseEntity<List<MyBean>> response =
     template.exchange("https://example.com",HttpMethod.GET, null, myBean);
 exchange in interface AsyncRestOperationsurl - the URLmethod - the HTTP method (GET, POST, etc)requestEntity - the entity (headers and/or body) to write to the
 request (may be null)responseType - the type of the return valueuriVariables - the variables to expand in the templateFutureRestClientExceptionpublic <T> ListenableFuture<ResponseEntity<T>> exchange(String url, HttpMethod method, @Nullable HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType, Map<String,?> uriVariables) throws RestClientException
AsyncRestOperationsResponseEntity.
 The given ParameterizedTypeReference is used to pass generic type
 information:
 
 ParameterizedTypeReference<List<MyBean>> myBean =
     new ParameterizedTypeReference<List<MyBean>>() {};
 ResponseEntity<List<MyBean>> response =
     template.exchange("https://example.com",HttpMethod.GET, null, myBean);
 exchange in interface AsyncRestOperationsurl - the URLmethod - the HTTP method (GET, POST, etc)requestEntity - the entity (headers and/or body) to write to the request
 (may be null)responseType - the type of the return valueuriVariables - the variables to expand in the templateFutureRestClientExceptionpublic <T> ListenableFuture<ResponseEntity<T>> exchange(URI url, HttpMethod method, @Nullable HttpEntity<?> requestEntity, ParameterizedTypeReference<T> responseType) throws RestClientException
AsyncRestOperationsResponseEntity.
 The given ParameterizedTypeReference is used to pass generic type
 information:
 
 ParameterizedTypeReference<List<MyBean>> myBean =
     new ParameterizedTypeReference<List<MyBean>>() {};
 ResponseEntity<List<MyBean>> response =
     template.exchange("https://example.com",HttpMethod.GET, null, myBean);
 exchange in interface AsyncRestOperationsurl - the URLmethod - the HTTP method (GET, POST, etc)requestEntity - the entity (headers and/or body) to write to the request
 (may be null)responseType - the type of the return valueFutureRestClientExceptionpublic <T> ListenableFuture<T> execute(String url, HttpMethod method, @Nullable AsyncRequestCallback requestCallback, @Nullable ResponseExtractor<T> responseExtractor, Object... uriVariables) throws RestClientException
AsyncRestOperationsAsyncRequestCallback, and reading the response with a
 ResponseExtractor.
 URI Template variables are expanded using the given URI variables, if any.
execute in interface AsyncRestOperationsurl - the URLmethod - the HTTP method (GET, POST, etc)requestCallback - object that prepares the requestresponseExtractor - object that extracts the return value from the responseuriVariables - the variables to expand in the templateResponseExtractorRestClientExceptionpublic <T> ListenableFuture<T> execute(String url, HttpMethod method, @Nullable AsyncRequestCallback requestCallback, @Nullable ResponseExtractor<T> responseExtractor, Map<String,?> uriVariables) throws RestClientException
AsyncRestOperationsAsyncRequestCallback, and reading the response with a
 ResponseExtractor.
 URI Template variables are expanded using the given URI variables map.
execute in interface AsyncRestOperationsurl - the URLmethod - the HTTP method (GET, POST, etc)requestCallback - object that prepares the requestresponseExtractor - object that extracts the return value from the responseuriVariables - the variables to expand in the templateResponseExtractorRestClientExceptionpublic <T> ListenableFuture<T> execute(URI url, HttpMethod method, @Nullable AsyncRequestCallback requestCallback, @Nullable ResponseExtractor<T> responseExtractor) throws RestClientException
AsyncRestOperationsAsyncRequestCallback, and reading the response with a
 ResponseExtractor.execute in interface AsyncRestOperationsurl - the URLmethod - the HTTP method (GET, POST, etc)requestCallback - object that prepares the requestresponseExtractor - object that extracts the return value from the responseResponseExtractorRestClientExceptionprotected <T> ListenableFuture<T> doExecute(URI url, HttpMethod method, @Nullable AsyncRequestCallback requestCallback, @Nullable ResponseExtractor<T> responseExtractor) throws RestClientException
ClientHttpRequest
 is processed using the RequestCallback; the response with
 the ResponseExtractor.url - the fully-expanded URL to connect tomethod - the HTTP method to execute (GET, POST, etc.)requestCallback - object that prepares the request (can be null)responseExtractor - object that extracts the return value from the response (can
 be null)ResponseExtractorRestClientExceptionprotected <T> AsyncRequestCallback acceptHeaderRequestCallback(Class<T> responseType)
Accept
 headers based on the given response type and configured message converters.protected <T> AsyncRequestCallback httpEntityCallback(@Nullable HttpEntity<T> requestBody)
protected <T> AsyncRequestCallback httpEntityCallback(@Nullable HttpEntity<T> request, Type responseType)
protected <T> ResponseExtractor<ResponseEntity<T>> responseEntityExtractor(Type responseType)
ResponseEntity.protected ResponseExtractor<HttpHeaders> headersExtractor()
HttpHeaders.