Interface ResponseExtractor<T>
- Type Parameters:
T- the data type
- All Known Implementing Classes:
HttpMessageConverterExtractor
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
@Deprecated(since="7.1",
forRemoval=true)
public interface ResponseExtractor<T>
Deprecated, for removal: This API element is subject to removal in a future version.
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. There is one available factory method, see
RestTemplate.responseEntityExtractor(Type).
- Since:
- 3.0
- Author:
- Arjen Poutsma
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionextractData(ClientHttpResponse response) Deprecated, for removal: This API element is subject to removal in a future version.Extract data from the givenClientHttpResponseand return it.
-
Method Details
-
extractData
Deprecated, for removal: This API element is subject to removal in a future version.Extract data from the givenClientHttpResponseand return it.- Parameters:
response- the HTTP response- Returns:
- the extracted data
- Throws:
IOException- in case of I/O errors
-
RestClient.RequestHeadersSpec.exchange(RestClient.RequestHeadersSpec.ExchangeFunction).