类 ReactorClientHttpResponse

java.lang.Object
cn.taketoday.http.client.reactive.ReactorClientHttpResponse
所有已实现的接口:
ClientHttpResponse, HttpMessage, ReactiveHttpInputMessage

class ReactorClientHttpResponse extends Object implements ClientHttpResponse
ClientHttpResponse implementation for the Reactor-Netty HTTP client.
从以下版本开始:
4.0
作者:
Brian Clozel, Rossen Stoyanchev, Harry Yang
另请参阅:
  • HttpClient
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    private final cn.taketoday.core.io.buffer.NettyDataBufferFactory
     
    private final HttpHeaders
     
    private final reactor.netty.NettyInbound
     
    private static final cn.taketoday.logging.Logger
     
    private final reactor.netty.http.client.HttpClientResponse
     
    private final AtomicInteger
     
  • 构造器概要

    构造器
    构造器
    说明
    ReactorClientHttpResponse(reactor.netty.http.client.HttpClientResponse response, reactor.netty.Connection connection)
    Constructor that matches the inputs from HttpClient.ResponseReceiver.responseConnection(BiFunction).
    ReactorClientHttpResponse(reactor.netty.http.client.HttpClientResponse response, reactor.netty.NettyInbound inbound, io.netty.buffer.ByteBufAllocator alloc)
    Constructor with inputs extracted from a Connection.
  • 方法概要

    修饰符和类型
    方法
    说明
    reactor.core.publisher.Flux<cn.taketoday.core.io.buffer.DataBuffer>
    Return the body of the message as a Publisher.
    cn.taketoday.util.MultiValueMap<String,ResponseCookie>
    Return a read-only map of response cookies received from the server.
    Return the headers of this message.
    Return an id that represents the underlying connection, if available, or the request for the purpose of correlating log messages.
    int
    Return the HTTP status code (potentially non-standard and not resolvable through the HttpStatus enum) as an integer.
    private static String
    getSameSite(io.netty.handler.codec.http.cookie.Cookie cookie)
     
    private boolean
     
    (专用程序包) void
    Called by ReactorClientHttpConnector when a cancellation is detected but the content has not been subscribed to.
     

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

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    从接口继承的方法 cn.taketoday.http.client.reactive.ClientHttpResponse

    getStatusCode
  • 字段详细资料

    • logger

      private static final cn.taketoday.logging.Logger logger
    • headers

      private final HttpHeaders headers
    • inbound

      private final reactor.netty.NettyInbound inbound
    • response

      private final reactor.netty.http.client.HttpClientResponse response
    • bufferFactory

      private final cn.taketoday.core.io.buffer.NettyDataBufferFactory bufferFactory
    • state

      private final AtomicInteger state
  • 构造器详细资料

    • ReactorClientHttpResponse

      public ReactorClientHttpResponse(reactor.netty.http.client.HttpClientResponse response, reactor.netty.Connection connection)
      Constructor that matches the inputs from HttpClient.ResponseReceiver.responseConnection(BiFunction).
    • ReactorClientHttpResponse

      public ReactorClientHttpResponse(reactor.netty.http.client.HttpClientResponse response, reactor.netty.NettyInbound inbound, io.netty.buffer.ByteBufAllocator alloc)
      Constructor with inputs extracted from a Connection.
  • 方法详细资料

    • getId

      public String getId()
      从接口复制的说明: ClientHttpResponse
      Return an id that represents the underlying connection, if available, or the request for the purpose of correlating log messages.
      指定者:
      getId 在接口中 ClientHttpResponse
    • getBody

      public reactor.core.publisher.Flux<cn.taketoday.core.io.buffer.DataBuffer> getBody()
      从接口复制的说明: ReactiveHttpInputMessage
      Return the body of the message as a Publisher.
      指定者:
      getBody 在接口中 ReactiveHttpInputMessage
      返回:
      the body content publisher
    • getHeaders

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

      public int getRawStatusCode()
      从接口复制的说明: ClientHttpResponse
      Return the HTTP status code (potentially non-standard and not resolvable through the HttpStatus enum) as an integer.
      指定者:
      getRawStatusCode 在接口中 ClientHttpResponse
      返回:
      the HTTP status as an integer value
      另请参阅:
    • getCookies

      public cn.taketoday.util.MultiValueMap<String,ResponseCookie> getCookies()
      从接口复制的说明: ClientHttpResponse
      Return a read-only map of response cookies received from the server.
      指定者:
      getCookies 在接口中 ClientHttpResponse
    • getSameSite

      @Nullable private static String getSameSite(io.netty.handler.codec.http.cookie.Cookie cookie)
    • releaseAfterCancel

      void releaseAfterCancel(HttpMethod method)
      Called by ReactorClientHttpConnector when a cancellation is detected but the content has not been subscribed to. If the subscription never materializes then the content will remain not drained. Or it could still materialize if the cancellation happened very early, or the response reading was delayed for some reason.
    • mayHaveBody

      private boolean mayHaveBody(HttpMethod method)
    • toString

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