类 AbstractReactorHttpExchangeAdapter
java.lang.Object
cn.taketoday.web.service.invoker.AbstractReactorHttpExchangeAdapter
- 所有已实现的接口:
HttpExchangeAdapter,ReactorHttpExchangeAdapter
- 直接已知子类:
WebClientAdapter
public abstract class AbstractReactorHttpExchangeAdapter
extends Object
implements ReactorHttpExchangeAdapter
Convenient base class for a
ReactorHttpExchangeAdapter implementation
adapting to the synchronous HttpExchangeAdapter contract.- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev, Harry Yang
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidexchange(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> TexchangeForBody(HttpRequestValues requestValues, cn.taketoday.core.ParameterizedTypeReference<T> bodyType) Perform the given request and decode the response content to the given type.<T> ResponseEntity<T>exchangeForEntity(HttpRequestValues requestValues, cn.taketoday.core.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 configured time to block for the response from an HTTP service method with a synchronous (blocking) method signature.cn.taketoday.core.ReactiveAdapterRegistryReturn the configuredReactiveAdapterRegistry.voidsetBlockTimeout(Duration blockTimeout) Configure how long to block for the response of an HTTP service method as described ingetBlockTimeout().voidsetReactiveAdapterRegistry(cn.taketoday.core.ReactiveAdapterRegistry reactiveAdapterRegistry) Configure theReactiveAdapterRegistryto use.从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 cn.taketoday.web.service.invoker.HttpExchangeAdapter
supportsRequestAttributes从接口继承的方法 cn.taketoday.web.service.invoker.ReactorHttpExchangeAdapter
exchangeForBodilessEntityMono, exchangeForBodyFlux, exchangeForBodyMono, exchangeForEntityFlux, exchangeForEntityMono, exchangeForHeadersMono, exchangeForMono
-
字段详细资料
-
reactiveAdapterRegistry
private cn.taketoday.core.ReactiveAdapterRegistry reactiveAdapterRegistry -
blockTimeout
-
-
构造器详细资料
-
AbstractReactorHttpExchangeAdapter
protected AbstractReactorHttpExchangeAdapter()Protected constructor, for subclasses.
-
-
方法详细资料
-
setReactiveAdapterRegistry
public void setReactiveAdapterRegistry(cn.taketoday.core.ReactiveAdapterRegistry reactiveAdapterRegistry) Configure theReactiveAdapterRegistryto use.By default, this is
ReactiveAdapterRegistry.getSharedInstance(). -
getReactiveAdapterRegistry
public cn.taketoday.core.ReactiveAdapterRegistry getReactiveAdapterRegistry()从接口复制的说明:ReactorHttpExchangeAdapterReturn the configuredReactiveAdapterRegistry. -
setBlockTimeout
Configure how long to block for the response of an HTTP service method as described ingetBlockTimeout(). -
getBlockTimeout
从接口复制的说明:ReactorHttpExchangeAdapterReturn the configured time to block for the response from an HTTP service method with a synchronous (blocking) method signature.By default, not set in which case the behavior depends on connection and request timeout settings of the underlying HTTP client. We recommend configuring timeout values directly on the underlying HTTP client, which provides more control over such settings.
- 指定者:
getBlockTimeout在接口中ReactorHttpExchangeAdapter
-
exchange
从接口复制的说明:HttpExchangeAdapterPerform the given request, and release the response content, if any.- 指定者:
exchange在接口中HttpExchangeAdapter- 参数:
requestValues- the request to perform
-
exchangeForHeaders
从接口复制的说明:HttpExchangeAdapterPerform the given request, release the response content, and return the response headers.- 指定者:
exchangeForHeaders在接口中HttpExchangeAdapter- 参数:
requestValues- the request to perform- 返回:
- the response headers
-
exchangeForBody
public <T> T exchangeForBody(HttpRequestValues requestValues, cn.taketoday.core.ParameterizedTypeReference<T> bodyType) 从接口复制的说明:HttpExchangeAdapterPerform the given request and decode the response content to the given type.- 指定者:
exchangeForBody在接口中HttpExchangeAdapter- 类型参数:
T- the type the response is decoded to- 参数:
requestValues- the request to performbodyType- the target type to decode to- 返回:
- the decoded response body.
-
exchangeForBodilessEntity
从接口复制的说明:HttpExchangeAdapterVariant ofHttpExchangeAdapter.exchange(HttpRequestValues)with additional access to the response status and headers.- 指定者:
exchangeForBodilessEntity在接口中HttpExchangeAdapter- 返回:
- the response entity with status and headers.
-
exchangeForEntity
public <T> ResponseEntity<T> exchangeForEntity(HttpRequestValues requestValues, cn.taketoday.core.ParameterizedTypeReference<T> bodyType) 从接口复制的说明:HttpExchangeAdapterVariant ofHttpExchangeAdapter.exchangeForBody(HttpRequestValues, ParameterizedTypeReference)with additional access to the response status and headers.- 指定者:
exchangeForEntity在接口中HttpExchangeAdapter- 返回:
- the response entity with status, headers, and body.
-