类 AbstractClientHttpRequest
java.lang.Object
cn.taketoday.http.client.reactive.AbstractClientHttpRequest
- 所有已实现的接口:
ClientHttpRequest,HttpMessage,ReactiveHttpOutputMessage
- 直接已知子类:
HttpComponentsClientHttpRequest,JdkClientHttpRequest,JettyClientHttpRequest,ReactorClientHttpRequest,ReactorNetty2ClientHttpRequest
Base class for
ClientHttpRequest implementations.- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev, Brian Clozel
-
嵌套类概要
嵌套类修饰符和类型类说明private static enumCOMMITTING -> COMMITTED is the period after doCommit is called but before the response status and headers have been applied to the underlying response during which time pre-commit actions can still make changes to the response status and headers. -
字段概要
字段修饰符和类型字段说明private final cn.taketoday.util.MultiValueMap<String,HttpCookie> private final HttpHeadersprivate HttpHeadersprivate final AtomicReference<AbstractClientHttpRequest.State> -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected abstract voidAdd cookies fromgetHeaders()to the underlying request.protected abstract voidApply header changes fromgetHeaders()to the underlying request.voidbeforeCommit(Supplier<? extends reactor.core.publisher.Mono<Void>> action) Register an action to apply just before the HttpOutputMessage is committed.protected reactor.core.publisher.Mono<Void>doCommit()A variant ofdoCommit(Supplier)for a request without body.protected reactor.core.publisher.Mono<Void>ApplybeforeCommitactions, apply the request headers/cookies, and write the request 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.protected HttpHeadersInitialize the read-only headers after the request is committed.booleanWhether the HttpOutputMessage is committed.从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 cn.taketoday.http.client.reactive.ClientHttpRequest
getMethod, getNativeRequest, getURI从接口继承的方法 cn.taketoday.http.ReactiveHttpOutputMessage
bufferFactory, setComplete, writeAndFlushWith, writeWith
-
字段详细资料
-
headers
-
cookies
-
state
-
commitActions
-
readOnlyHeaders
-
-
构造器详细资料
-
AbstractClientHttpRequest
public AbstractClientHttpRequest() -
AbstractClientHttpRequest
-
-
方法详细资料
-
getHeaders
从接口复制的说明:HttpMessageReturn the headers of this message.- 指定者:
getHeaders在接口中HttpMessage- 返回:
- a corresponding HttpHeaders object (never
null)
-
initReadOnlyHeaders
Initialize the read-only headers after the request is committed.By default, this method simply applies a read-only wrapper. Subclasses can do the same for headers from the native request.
-
getCookies
从接口复制的说明:ClientHttpRequestReturn a mutable map of request cookies to send to the server.- 指定者:
getCookies在接口中ClientHttpRequest
-
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
-
doCommit
A variant ofdoCommit(Supplier)for a request without body.- 返回:
- a completion publisher
-
doCommit
protected reactor.core.publisher.Mono<Void> doCommit(@Nullable Supplier<? extends org.reactivestreams.Publisher<Void>> writeAction) ApplybeforeCommitactions, apply the request headers/cookies, and write the request body.- 参数:
writeAction- the action to write the request body (may benull)- 返回:
- a completion publisher
-
applyHeaders
protected abstract void applyHeaders()Apply header changes fromgetHeaders()to the underlying request. This method is called once only. -
applyCookies
protected abstract void applyCookies()Add cookies fromgetHeaders()to the underlying request. This method is called once only.
-