类 ClientHttpRequestDecorator
java.lang.Object
cn.taketoday.http.client.reactive.ClientHttpRequestDecorator
- 所有已实现的接口:
ClientHttpRequest,HttpMessage,ReactiveHttpOutputMessage
Wraps another
ClientHttpRequest and delegates all methods to it.
Sub-classes can override specific methods selectively.- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidbeforeCommit(Supplier<? extends reactor.core.publisher.Mono<Void>> action) Register an action to apply just before the HttpOutputMessage is committed.cn.taketoday.core.io.buffer.DataBufferFactoryReturn aDataBufferFactorythat can be used to create the body.cn.taketoday.util.MultiValueMap<String,HttpCookie> Return a mutable map of request cookies to send to the server.Return the headers of this message.Return the HTTP method of the request.<T> TReturn the request from the underlying HTTP library.getURI()Return the URI of the request.booleanWhether the HttpOutputMessage is committed.reactor.core.publisher.Mono<Void>Indicate that message handling is complete, allowing for any cleanup or end-of-processing tasks to be performed such as applying header changes made viaHttpMessage.getHeaders()to the underlying HTTP message (if not applied already).toString()reactor.core.publisher.Mono<Void>writeAndFlushWith(org.reactivestreams.Publisher<? extends org.reactivestreams.Publisher<? extends cn.taketoday.core.io.buffer.DataBuffer>> body) Use the givenPublisherofPublishersto write the body of the HttpOutputMessage to the underlying HTTP layer, flushing after eachPublisher<DataBuffer>.reactor.core.publisher.Mono<Void>writeWith(org.reactivestreams.Publisher<? extends cn.taketoday.core.io.buffer.DataBuffer> body) Use the givenPublisherto write the body of the message to the underlying HTTP layer.
-
字段详细资料
-
delegate
-
-
构造器详细资料
-
ClientHttpRequestDecorator
-
-
方法详细资料
-
getDelegate
-
getMethod
从接口复制的说明:ClientHttpRequestReturn the HTTP method of the request.- 指定者:
getMethod在接口中ClientHttpRequest
-
getURI
从接口复制的说明:ClientHttpRequestReturn the URI of the request.- 指定者:
getURI在接口中ClientHttpRequest
-
getHeaders
从接口复制的说明:HttpMessageReturn the headers of this message.- 指定者:
getHeaders在接口中HttpMessage- 返回:
- a corresponding HttpHeaders object (never
null)
-
getCookies
从接口复制的说明:ClientHttpRequestReturn a mutable map of request cookies to send to the server.- 指定者:
getCookies在接口中ClientHttpRequest
-
bufferFactory
public cn.taketoday.core.io.buffer.DataBufferFactory bufferFactory()从接口复制的说明:ReactiveHttpOutputMessageReturn aDataBufferFactorythat can be used to create the body.- 指定者:
bufferFactory在接口中ReactiveHttpOutputMessage- 返回:
- a buffer factory
- 另请参阅:
-
getNativeRequest
public <T> T getNativeRequest()从接口复制的说明:ClientHttpRequestReturn the request from the underlying HTTP library.- 指定者:
getNativeRequest在接口中ClientHttpRequest- 类型参数:
T- the expected type of the request to cast to
-
beforeCommit
从接口复制的说明:ReactiveHttpOutputMessageRegister an action to apply just before the HttpOutputMessage is committed.Note: the supplied action must be properly deferred, e.g. via
Mono.defer(java.util.function.Supplier<? extends reactor.core.publisher.Mono<? extends T>>)orMono.fromRunnable(java.lang.Runnable), to ensure it's executed in the right order, relative to other actions.- 指定者:
beforeCommit在接口中ReactiveHttpOutputMessage- 参数:
action- the action to apply
-
isCommitted
public boolean isCommitted()从接口复制的说明:ReactiveHttpOutputMessageWhether the HttpOutputMessage is committed.- 指定者:
isCommitted在接口中ReactiveHttpOutputMessage
-
writeWith
public reactor.core.publisher.Mono<Void> writeWith(org.reactivestreams.Publisher<? extends cn.taketoday.core.io.buffer.DataBuffer> body) 从接口复制的说明:ReactiveHttpOutputMessageUse the givenPublisherto write the body of the message to the underlying HTTP layer.- 指定者:
writeWith在接口中ReactiveHttpOutputMessage- 参数:
body- the body content publisher- 返回:
- a
Monothat indicates completion or error
-
writeAndFlushWith
public reactor.core.publisher.Mono<Void> writeAndFlushWith(org.reactivestreams.Publisher<? extends org.reactivestreams.Publisher<? extends cn.taketoday.core.io.buffer.DataBuffer>> body) 从接口复制的说明:ReactiveHttpOutputMessageUse the givenPublisherofPublishersto write the body of the HttpOutputMessage to the underlying HTTP layer, flushing after eachPublisher<DataBuffer>.- 指定者:
writeAndFlushWith在接口中ReactiveHttpOutputMessage- 参数:
body- the body content publisher- 返回:
- a
Monothat indicates completion or error
-
setComplete
从接口复制的说明:ReactiveHttpOutputMessageIndicate that message handling is complete, allowing for any cleanup or end-of-processing tasks to be performed such as applying header changes made viaHttpMessage.getHeaders()to the underlying HTTP message (if not applied already).This method should be automatically invoked at the end of message processing so typically applications should not have to invoke it. If invoked multiple times it should have no side effects.
- 指定者:
setComplete在接口中ReactiveHttpOutputMessage- 返回:
- a
Monothat indicates completion or error
-
toString
-