类 JdkClientHttpRequest
java.lang.Object
cn.taketoday.http.client.reactive.AbstractClientHttpRequest
cn.taketoday.http.client.reactive.JdkClientHttpRequest
- 所有已实现的接口:
ClientHttpRequest,HttpMessage,ReactiveHttpOutputMessage
ClientHttpRequest for the Java HttpClient.- 从以下版本开始:
- 4.0
- 作者:
- Julien Eyraud, Rossen Stoyanchev
-
字段概要
字段修饰符和类型字段说明private final cn.taketoday.core.io.buffer.DataBufferFactoryprivate final HttpRequest.Builderprivate final HttpMethodprivate final URI -
构造器概要
构造器构造器说明JdkClientHttpRequest(HttpMethod httpMethod, URI uri, cn.taketoday.core.io.buffer.DataBufferFactory bufferFactory) -
方法概要
修饰符和类型方法说明protected voidAdd cookies fromAbstractClientHttpRequest.getHeaders()to the underlying request.protected voidApply header changes fromAbstractClientHttpRequest.getHeaders()to the underlying request.cn.taketoday.core.io.buffer.DataBufferFactoryReturn aDataBufferFactorythat can be used to create the body.Return the HTTP method of the request.<T> TReturn the request from the underlying HTTP library.getURI()Return the URI of the request.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).private HttpRequest.BodyPublishertoBodyPublisher(org.reactivestreams.Publisher<? extends cn.taketoday.core.io.buffer.DataBuffer> body) private ByteBuffertoByteBuffer(cn.taketoday.core.io.buffer.DataBuffer dataBuffer) 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.从类继承的方法 cn.taketoday.http.client.reactive.AbstractClientHttpRequest
beforeCommit, doCommit, doCommit, getCookies, getHeaders, initReadOnlyHeaders, isCommitted
-
字段详细资料
-
method
-
uri
-
bufferFactory
private final cn.taketoday.core.io.buffer.DataBufferFactory bufferFactory -
builder
-
-
构造器详细资料
-
JdkClientHttpRequest
public JdkClientHttpRequest(HttpMethod httpMethod, URI uri, cn.taketoday.core.io.buffer.DataBufferFactory bufferFactory)
-
-
方法详细资料
-
getMethod
从接口复制的说明:ClientHttpRequestReturn the HTTP method of the request. -
getURI
从接口复制的说明:ClientHttpRequestReturn the URI of the request. -
bufferFactory
public cn.taketoday.core.io.buffer.DataBufferFactory bufferFactory()从接口复制的说明:ReactiveHttpOutputMessageReturn aDataBufferFactorythat can be used to create the body.- 返回:
- a buffer factory
- 另请参阅:
-
getNativeRequest
public <T> T getNativeRequest()从接口复制的说明:ClientHttpRequestReturn the request from the underlying HTTP library.- 类型参数:
T- the expected type of the request to cast to
-
applyHeaders
protected void applyHeaders()从类复制的说明:AbstractClientHttpRequestApply header changes fromAbstractClientHttpRequest.getHeaders()to the underlying request. This method is called once only.- 指定者:
applyHeaders在类中AbstractClientHttpRequest
-
applyCookies
protected void applyCookies()从类复制的说明:AbstractClientHttpRequestAdd cookies fromAbstractClientHttpRequest.getHeaders()to the underlying request. This method is called once only.- 指定者:
applyCookies在类中AbstractClientHttpRequest
-
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.- 参数:
body- the body content publisher- 返回:
- a
Monothat indicates completion or error
-
toBodyPublisher
private HttpRequest.BodyPublisher toBodyPublisher(org.reactivestreams.Publisher<? extends cn.taketoday.core.io.buffer.DataBuffer> body) -
toByteBuffer
-
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>.- 参数:
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.
- 返回:
- a
Monothat indicates completion or error
-