Spring Framework

org.springframework.web.client
Interface ResponseExtractor<T>

All Known Implementing Classes:
HttpMessageConverterExtractor

public interface ResponseExtractor<T>

Generic callback interface used by RestTemplate's retrieval methods Implementations of this interface perform the actual work of extracting data from a ClientHttpResponse, but don't need to worry about exception handling or closing resources.

Used internally by the RestTemplate, but also useful for application code.

Since:
3.0
Author:
Arjen Poutsma
See Also:
RestTemplate.execute(java.lang.String, org.springframework.http.HttpMethod, org.springframework.web.client.RequestCallback, org.springframework.web.client.ResponseExtractor, java.lang.Object...)

Method Summary
 T extractData(ClientHttpResponse response)
          Extract data from the given ClientHttpResponse and return it.
 

Method Detail

extractData

T extractData(ClientHttpResponse response)
              throws java.io.IOException
Extract data from the given ClientHttpResponse and return it.

Parameters:
response - the HTTP response
Returns:
the extracted data
Throws:
java.io.IOException - in case of I/O errors

Spring Framework