Package org.springframework.web.client
Interface ResponseExtractor<T>
- All Known Implementing Classes:
HttpMessageConverterExtractor
public interface ResponseExtractor<T>
Generic callback interface used byRestTemplate's retrieval methods Implementations of this interface perform the actual work of extracting data from aClientHttpResponse, but don't need to worry about exception handling or closing resources.Used internally by the
RestTemplate, but also useful for application code.
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TextractData(ClientHttpResponse response)Extract data from the givenClientHttpResponseand return it.
Method Detail
extractData
T extractData(ClientHttpResponse response) throws IOException
Extract data from the givenClientHttpResponseand return it.- Parameters:
response- the HTTP response- Returns:
- the extracted data
- Throws:
IOException- in case of I/O errors