类 ClientHttpRequestDecorator

java.lang.Object
cn.taketoday.http.client.reactive.ClientHttpRequestDecorator
所有已实现的接口:
ClientHttpRequest, HttpMessage, ReactiveHttpOutputMessage

public class ClientHttpRequestDecorator extends Object implements ClientHttpRequest
Wraps another ClientHttpRequest and delegates all methods to it. Sub-classes can override specific methods selectively.
从以下版本开始:
4.0
作者:
Rossen Stoyanchev
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    private final ClientHttpRequest
     
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    void
    beforeCommit(Supplier<? extends reactor.core.publisher.Mono<Void>> action)
    Register an action to apply just before the HttpOutputMessage is committed.
    cn.taketoday.core.io.buffer.DataBufferFactory
    Return a DataBufferFactory that 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> T
    Return the request from the underlying HTTP library.
    Return the URI of the request.
    boolean
    Whether 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 via HttpMessage.getHeaders() to the underlying HTTP message (if not applied already).
     
    reactor.core.publisher.Mono<Void>
    writeAndFlushWith(org.reactivestreams.Publisher<? extends org.reactivestreams.Publisher<? extends cn.taketoday.core.io.buffer.DataBuffer>> body)
    Use the given Publisher of Publishers to write the body of the HttpOutputMessage to the underlying HTTP layer, flushing after each Publisher<DataBuffer>.
    reactor.core.publisher.Mono<Void>
    writeWith(org.reactivestreams.Publisher<? extends cn.taketoday.core.io.buffer.DataBuffer> body)
    Use the given Publisher to write the body of the message to the underlying HTTP layer.

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 字段详细资料

  • 构造器详细资料

    • ClientHttpRequestDecorator

      public ClientHttpRequestDecorator(ClientHttpRequest delegate)
  • 方法详细资料

    • getDelegate

      public ClientHttpRequest getDelegate()
    • getMethod

      public HttpMethod getMethod()
      从接口复制的说明: ClientHttpRequest
      Return the HTTP method of the request.
      指定者:
      getMethod 在接口中 ClientHttpRequest
    • getURI

      public URI getURI()
      从接口复制的说明: ClientHttpRequest
      Return the URI of the request.
      指定者:
      getURI 在接口中 ClientHttpRequest
    • getHeaders

      public HttpHeaders getHeaders()
      从接口复制的说明: HttpMessage
      Return the headers of this message.
      指定者:
      getHeaders 在接口中 HttpMessage
      返回:
      a corresponding HttpHeaders object (never null)
    • getCookies

      public cn.taketoday.util.MultiValueMap<String,HttpCookie> getCookies()
      从接口复制的说明: ClientHttpRequest
      Return a mutable map of request cookies to send to the server.
      指定者:
      getCookies 在接口中 ClientHttpRequest
    • bufferFactory

      public cn.taketoday.core.io.buffer.DataBufferFactory bufferFactory()
      从接口复制的说明: ReactiveHttpOutputMessage
      Return a DataBufferFactory that can be used to create the body.
      指定者:
      bufferFactory 在接口中 ReactiveHttpOutputMessage
      返回:
      a buffer factory
      另请参阅:
    • getNativeRequest

      public <T> T getNativeRequest()
      从接口复制的说明: ClientHttpRequest
      Return the request from the underlying HTTP library.
      指定者:
      getNativeRequest 在接口中 ClientHttpRequest
      类型参数:
      T - the expected type of the request to cast to
    • beforeCommit

      public void beforeCommit(Supplier<? extends reactor.core.publisher.Mono<Void>> action)
      从接口复制的说明: ReactiveHttpOutputMessage
      Register 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>>) or Mono.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()
      从接口复制的说明: ReactiveHttpOutputMessage
      Whether 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)
      从接口复制的说明: ReactiveHttpOutputMessage
      Use the given Publisher to write the body of the message to the underlying HTTP layer.
      指定者:
      writeWith 在接口中 ReactiveHttpOutputMessage
      参数:
      body - the body content publisher
      返回:
      a Mono that 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)
      从接口复制的说明: ReactiveHttpOutputMessage
      Use the given Publisher of Publishers to write the body of the HttpOutputMessage to the underlying HTTP layer, flushing after each Publisher<DataBuffer>.
      指定者:
      writeAndFlushWith 在接口中 ReactiveHttpOutputMessage
      参数:
      body - the body content publisher
      返回:
      a Mono that indicates completion or error
    • setComplete

      public reactor.core.publisher.Mono<Void> setComplete()
      从接口复制的说明: ReactiveHttpOutputMessage
      Indicate that message handling is complete, allowing for any cleanup or end-of-processing tasks to be performed such as applying header changes made via HttpMessage.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 Mono that indicates completion or error
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object