Class HttpExchangeAdapterDecorator
java.lang.Object
org.springframework.web.service.invoker.HttpExchangeAdapterDecorator
- All Implemented Interfaces:
HttpExchangeAdapter
- Direct Known Subclasses:
NotFoundRestClientAdapterDecorator, ReactorHttpExchangeAdapterDecorator
HttpExchangeAdapter that wraps and delegates to another adapter instance.- Since:
- 7.0
- Author:
- Rossen Stoyanchev
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexchange(HttpRequestValues requestValues) Perform the given request, and release the response content, if any.exchangeForBodilessEntity(HttpRequestValues requestValues) Variant ofHttpExchangeAdapter.exchange(HttpRequestValues)with additional access to the response status and headers.<T> @Nullable TexchangeForBody(HttpRequestValues requestValues, ParameterizedTypeReference<T> bodyType) Perform the given request and decode the response content to the given type.<T> ResponseEntity<T> exchangeForEntity(HttpRequestValues requestValues, ParameterizedTypeReference<T> bodyType) Variant ofHttpExchangeAdapter.exchangeForBody(HttpRequestValues, ParameterizedTypeReference)with additional access to the response status and headers.exchangeForHeaders(HttpRequestValues requestValues) Perform the given request, release the response content, and return the response headers.Return the wrapped delgateHttpExchangeAdapter.booleanWhether the underlying client supports use of request attributes.
-
Constructor Details
-
HttpExchangeAdapterDecorator
-
-
Method Details
-
getHttpExchangeAdapter
Return the wrapped delgateHttpExchangeAdapter. -
supportsRequestAttributes
public boolean supportsRequestAttributes()Description copied from interface:HttpExchangeAdapterWhether the underlying client supports use of request attributes.- Specified by:
supportsRequestAttributesin interfaceHttpExchangeAdapter
-
exchange
Description copied from interface:HttpExchangeAdapterPerform the given request, and release the response content, if any.- Specified by:
exchangein interfaceHttpExchangeAdapter- Parameters:
requestValues- the request to perform
-
exchangeForHeaders
Description copied from interface:HttpExchangeAdapterPerform the given request, release the response content, and return the response headers.- Specified by:
exchangeForHeadersin interfaceHttpExchangeAdapter- Parameters:
requestValues- the request to perform- Returns:
- the response headers
-
exchangeForBody
public <T> @Nullable T exchangeForBody(HttpRequestValues requestValues, ParameterizedTypeReference<T> bodyType) Description copied from interface:HttpExchangeAdapterPerform the given request and decode the response content to the given type.- Specified by:
exchangeForBodyin interfaceHttpExchangeAdapter- Type Parameters:
T- the type the response is decoded to- Parameters:
requestValues- the request to performbodyType- the target type to decode to- Returns:
- the decoded response body.
-
exchangeForBodilessEntity
Description copied from interface:HttpExchangeAdapterVariant ofHttpExchangeAdapter.exchange(HttpRequestValues)with additional access to the response status and headers.- Specified by:
exchangeForBodilessEntityin interfaceHttpExchangeAdapter- Returns:
- the response entity with status and headers.
-
exchangeForEntity
public <T> ResponseEntity<T> exchangeForEntity(HttpRequestValues requestValues, ParameterizedTypeReference<T> bodyType) Description copied from interface:HttpExchangeAdapterVariant ofHttpExchangeAdapter.exchangeForBody(HttpRequestValues, ParameterizedTypeReference)with additional access to the response status and headers.- Specified by:
exchangeForEntityin interfaceHttpExchangeAdapter- Returns:
- the response entity with status, headers, and body.
-