类 ReactorClientHttpRequest

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

class ReactorClientHttpRequest extends AbstractClientHttpRequest implements ZeroCopyHttpOutputMessage
ClientHttpRequest implementation for the Reactor-Netty HTTP client.
从以下版本开始:
4.0
作者:
Brian Clozel, Rossen Stoyanchev
另请参阅:
  • HttpClient
  • 字段详细资料

    • uri

      private final URI uri
    • httpMethod

      private final HttpMethod httpMethod
    • outbound

      private final reactor.netty.NettyOutbound outbound
    • request

      private final reactor.netty.http.client.HttpClientRequest request
    • bufferFactory

      private final cn.taketoday.core.io.buffer.NettyDataBufferFactory bufferFactory
  • 构造器详细资料

    • ReactorClientHttpRequest

      public ReactorClientHttpRequest(HttpMethod method, URI uri, reactor.netty.http.client.HttpClientRequest request, reactor.netty.NettyOutbound outbound)
  • 方法详细资料

    • 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
    • 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
    • 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
    • toByteBufs

      private static org.reactivestreams.Publisher<io.netty.buffer.ByteBuf> toByteBufs(org.reactivestreams.Publisher<? extends cn.taketoday.core.io.buffer.DataBuffer> dataBuffers)
    • writeWith

      public reactor.core.publisher.Mono<Void> writeWith(Path file, long position, long count)
      从接口复制的说明: ZeroCopyHttpOutputMessage
      Use the given Path to write the body of the message to the underlying HTTP layer.
      指定者:
      writeWith 在接口中 ZeroCopyHttpOutputMessage
      参数:
      file - the file to transfer
      position - the position within the file from which the transfer is to begin
      count - the number of bytes to be transferred
      返回:
      a publisher 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
    • applyHeaders

      protected void applyHeaders()
      从类复制的说明: AbstractClientHttpRequest
      Apply header changes from AbstractClientHttpRequest.getHeaders() to the underlying request. This method is called once only.
      指定者:
      applyHeaders 在类中 AbstractClientHttpRequest
    • applyCookies

      protected void applyCookies()
      从类复制的说明: AbstractClientHttpRequest
      Add cookies from AbstractClientHttpRequest.getHeaders() to the underlying request. This method is called once only.
      指定者:
      applyCookies 在类中 AbstractClientHttpRequest
    • initReadOnlyHeaders

      protected HttpHeaders initReadOnlyHeaders()
      从类复制的说明: AbstractClientHttpRequest
      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.

      覆盖:
      initReadOnlyHeaders 在类中 AbstractClientHttpRequest