类 ClientResponseWrapper
java.lang.Object
cn.taketoday.web.reactive.function.client.support.ClientResponseWrapper
- 所有已实现的接口:
ClientResponse
Implementation of the
ClientResponse interface that can be subclassed
to adapt the request in a
exchange filter function.
All methods default to calling through to the wrapped request.- 从以下版本开始:
- 4.0
- 作者:
- Arjen Poutsma
-
嵌套类概要
嵌套类修饰符和类型类说明static classImplementation of theHeadersinterface that can be subclassed to adapt the headers in aexchange filter function.从接口继承的嵌套类/接口 cn.taketoday.web.reactive.function.client.ClientResponse
ClientResponse.Builder, ClientResponse.Headers -
字段概要
字段 -
构造器概要
构造器构造器说明ClientResponseWrapper(ClientResponse delegate) Create a newClientResponseWrapperthat wraps the given response. -
方法概要
修饰符和类型方法说明<T> Tbody(BodyExtractor<T, ? super ClientHttpResponse> extractor) Extract the body with the givenBodyExtractor.<T> reactor.core.publisher.Flux<T>bodyToFlux(cn.taketoday.core.ParameterizedTypeReference<T> elementTypeRef) Extract the body to aFlux.<T> reactor.core.publisher.Flux<T>bodyToFlux(Class<? extends T> elementClass) Extract the body to aFlux.<T> reactor.core.publisher.Mono<T>bodyToMono(cn.taketoday.core.ParameterizedTypeReference<T> elementTypeRef) Extract the body to aMono.<T> reactor.core.publisher.Mono<T>bodyToMono(Class<? extends T> elementClass) Extract the body to aMono.cn.taketoday.util.MultiValueMap<String,ResponseCookie> cookies()Return the cookies of this response.<T> reactor.core.publisher.Mono<T>Create aMonothat terminates with aWebClientResponseException, containing the response status, headers, body, and the originating request.reactor.core.publisher.Mono<WebClientResponseException>Create aWebClientResponseExceptionthat contains the response status, headers, body, and the originating request.headers()Return the headers of this response.Return a log message prefix to use to correlate messages for this exchange.intReturn the (potentially non-standard) status code of this response.reactor.core.publisher.Mono<Void>Release the body of this response.response()Return the wrapped request.Return the HTTP status code as anHttpStatusCodevalue.Return the strategies used to convert the body of this response.reactor.core.publisher.Mono<ResponseEntity<Void>>Return this response as a delayedResponseEntitycontaining status and headers, but no body.<T> reactor.core.publisher.Mono<ResponseEntity<T>>toEntity(cn.taketoday.core.ParameterizedTypeReference<T> bodyTypeReference) Return this response as a delayedResponseEntity.<T> reactor.core.publisher.Mono<ResponseEntity<T>>Return this response as a delayedResponseEntity.<T> reactor.core.publisher.Mono<ResponseEntity<List<T>>>toEntityList(cn.taketoday.core.ParameterizedTypeReference<T> elementTypeRef) Return this response as a delayed list ofResponseEntitys.<T> reactor.core.publisher.Mono<ResponseEntity<List<T>>>toEntityList(Class<T> elementClass) Return this response as a delayed list ofResponseEntitys.从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 cn.taketoday.web.reactive.function.client.ClientResponse
mutate
-
字段详细资料
-
delegate
-
-
构造器详细资料
-
ClientResponseWrapper
Create a newClientResponseWrapperthat wraps the given response.- 参数:
delegate- the response to wrap
-
-
方法详细资料
-
response
Return the wrapped request. -
strategies
从接口复制的说明:ClientResponseReturn the strategies used to convert the body of this response.- 指定者:
strategies在接口中ClientResponse
-
statusCode
从接口复制的说明:ClientResponseReturn the HTTP status code as anHttpStatusCodevalue.- 指定者:
statusCode在接口中ClientResponse- 返回:
- the HTTP status as an HttpStatusCode value (never
null)
-
rawStatusCode
public int rawStatusCode()从接口复制的说明:ClientResponseReturn the (potentially non-standard) status code of this response.- 指定者:
rawStatusCode在接口中ClientResponse- 返回:
- the HTTP status as an integer value
- 另请参阅:
-
headers
从接口复制的说明:ClientResponseReturn the headers of this response.- 指定者:
headers在接口中ClientResponse
-
cookies
从接口复制的说明:ClientResponseReturn the cookies of this response.- 指定者:
cookies在接口中ClientResponse
-
body
从接口复制的说明:ClientResponseExtract the body with the givenBodyExtractor.- 指定者:
body在接口中ClientResponse- 类型参数:
T- the type of the body returned- 参数:
extractor- theBodyExtractorthat reads from the response- 返回:
- the extracted body
-
bodyToMono
从接口复制的说明:ClientResponseExtract the body to aMono.- 指定者:
bodyToMono在接口中ClientResponse- 类型参数:
T- the element type- 参数:
elementClass- the class of element in theMono- 返回:
- a mono containing the body of the given type
T
-
bodyToMono
public <T> reactor.core.publisher.Mono<T> bodyToMono(cn.taketoday.core.ParameterizedTypeReference<T> elementTypeRef) 从接口复制的说明:ClientResponseExtract the body to aMono.- 指定者:
bodyToMono在接口中ClientResponse- 类型参数:
T- the element type- 参数:
elementTypeRef- the type reference of element in theMono- 返回:
- a mono containing the body of the given type
T
-
bodyToFlux
从接口复制的说明:ClientResponseExtract the body to aFlux.- 指定者:
bodyToFlux在接口中ClientResponse- 类型参数:
T- the element type- 参数:
elementClass- the class of elements in theFlux- 返回:
- a flux containing the body of the given type
T
-
bodyToFlux
public <T> reactor.core.publisher.Flux<T> bodyToFlux(cn.taketoday.core.ParameterizedTypeReference<T> elementTypeRef) 从接口复制的说明:ClientResponseExtract the body to aFlux.- 指定者:
bodyToFlux在接口中ClientResponse- 类型参数:
T- the element type- 参数:
elementTypeRef- the type reference of elements in theFlux- 返回:
- a flux containing the body of the given type
T
-
releaseBody
从接口复制的说明:ClientResponseRelease the body of this response.- 指定者:
releaseBody在接口中ClientResponse- 返回:
- a completion signal
- 另请参阅:
-
DataBufferUtils.release(DataBuffer)
-
toBodilessEntity
从接口复制的说明:ClientResponseReturn this response as a delayedResponseEntitycontaining status and headers, but no body. Calling this method will release the body of the response.- 指定者:
toBodilessEntity在接口中ClientResponse- 返回:
Monowith the bodilessResponseEntity
-
toEntity
从接口复制的说明:ClientResponseReturn this response as a delayedResponseEntity.- 指定者:
toEntity在接口中ClientResponse- 类型参数:
T- response body type- 参数:
bodyType- the expected response body type- 返回:
Monowith theResponseEntity
-
toEntity
public <T> reactor.core.publisher.Mono<ResponseEntity<T>> toEntity(cn.taketoday.core.ParameterizedTypeReference<T> bodyTypeReference) 从接口复制的说明:ClientResponseReturn this response as a delayedResponseEntity.- 指定者:
toEntity在接口中ClientResponse- 类型参数:
T- response body type- 参数:
bodyTypeReference- a type reference describing the expected response body type- 返回:
Monowith theResponseEntity
-
toEntityList
从接口复制的说明:ClientResponseReturn this response as a delayed list ofResponseEntitys.- 指定者:
toEntityList在接口中ClientResponse- 类型参数:
T- the type of elements in the list- 参数:
elementClass- the expected response body list element class- 返回:
Monowith the list ofResponseEntitys
-
toEntityList
public <T> reactor.core.publisher.Mono<ResponseEntity<List<T>>> toEntityList(cn.taketoday.core.ParameterizedTypeReference<T> elementTypeRef) 从接口复制的说明:ClientResponseReturn this response as a delayed list ofResponseEntitys.- 指定者:
toEntityList在接口中ClientResponse- 类型参数:
T- the type of elements in the list- 参数:
elementTypeRef- the expected response body list element reference type- 返回:
Monowith the list ofResponseEntitys
-
createException
从接口复制的说明:ClientResponseCreate aWebClientResponseExceptionthat contains the response status, headers, body, and the originating request.- 指定者:
createException在接口中ClientResponse- 返回:
- a
Monowith the created exception
-
createError
public <T> reactor.core.publisher.Mono<T> createError()从接口复制的说明:ClientResponseCreate aMonothat terminates with aWebClientResponseException, containing the response status, headers, body, and the originating request.- 指定者:
createError在接口中ClientResponse- 类型参数:
T- the reified type- 返回:
- a
Monothat fails with aWebClientResponseException. - 另请参阅:
-
logPrefix
从接口复制的说明:ClientResponseReturn a log message prefix to use to correlate messages for this exchange.The prefix is based on ClientRequest.logPrefix(), which itself is based on the value of the
LOG_ID_ATTRIBUTErequest attribute, further surrounded with "[" and "]".- 指定者:
logPrefix在接口中ClientResponse- 返回:
- the log message prefix or an empty String if the
LOG_ID_ATTRIBUTEis not set
-