类 ResponseUtils

java.lang.Object
org.apache.shenyu.plugin.base.utils.ResponseUtils

public final class ResponseUtils extends Object
ResponseUtils.
  • 方法概要

    修饰符和类型
    方法
    说明
    static org.springframework.web.reactive.function.client.ClientResponse
    buildClientResponse(org.springframework.http.server.reactive.ServerHttpResponse response, org.reactivestreams.Publisher<? extends org.springframework.core.io.buffer.DataBuffer> body)
    build client response with current response data.
    static org.springframework.http.HttpHeaders
    chunkedHeader(org.springframework.http.HttpHeaders headers)
    Chunked Headers.
    static reactor.core.publisher.Mono<org.springframework.core.io.buffer.DataBuffer>
    fixBodyMessage(org.springframework.http.server.reactive.ServerHttpResponse response, CachedBodyOutputMessage outputMessage)
    fix the body message.
    newCachedBodyOutputMessage(org.springframework.web.server.ServerWebExchange exchange)
    create CachedBodyOutputMessage.
    static <T> reactor.core.publisher.Mono<T>
    release(CachedBodyOutputMessage outputMessage, Throwable throwable)
    release source.
    static <T, P extends org.reactivestreams.Publisher<T>>
    reactor.core.publisher.Mono<Void>
    writeWith(org.springframework.web.reactive.function.client.ClientResponse clientResponse, org.springframework.web.server.ServerWebExchange exchange, P publisher, Class<T> elementClass)
    the response write with data.

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

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 方法详细资料

    • newCachedBodyOutputMessage

      public static CachedBodyOutputMessage newCachedBodyOutputMessage(org.springframework.web.server.ServerWebExchange exchange)
      create CachedBodyOutputMessage.
      参数:
      exchange - ServerWebExchange
      返回:
      CachedBodyOutputMessage.
    • buildClientResponse

      public static org.springframework.web.reactive.function.client.ClientResponse buildClientResponse(org.springframework.http.server.reactive.ServerHttpResponse response, org.reactivestreams.Publisher<? extends org.springframework.core.io.buffer.DataBuffer> body)
      build client response with current response data.
      参数:
      response - current response
      body - current response body
      返回:
      the client response
    • fixBodyMessage

      public static reactor.core.publisher.Mono<org.springframework.core.io.buffer.DataBuffer> fixBodyMessage(org.springframework.http.server.reactive.ServerHttpResponse response, CachedBodyOutputMessage outputMessage)
      fix the body message.
      参数:
      response - current response
      outputMessage - cache message
      返回:
      fixed body message
    • release

      public static <T> reactor.core.publisher.Mono<T> release(CachedBodyOutputMessage outputMessage, Throwable throwable)
      release source.
      类型参数:
      T - the reified Subscriber type
      参数:
      outputMessage - CachedBodyOutputMessage
      throwable - Throwable
      返回:
      Mono.
    • chunkedHeader

      public static org.springframework.http.HttpHeaders chunkedHeader(org.springframework.http.HttpHeaders headers)
      Chunked Headers.
      参数:
      headers - headers.
      返回:
      chunked headers
    • writeWith

      public static <T, P extends org.reactivestreams.Publisher<T>> reactor.core.publisher.Mono<Void> writeWith(org.springframework.web.reactive.function.client.ClientResponse clientResponse, org.springframework.web.server.ServerWebExchange exchange, P publisher, Class<T> elementClass)
      the response write with data.
      类型参数:
      T - the element type
      P - the publishing type
      参数:
      clientResponse - the client response
      exchange - the exchange
      publisher - the publisher
      elementClass - the elementClass
      返回:
      the response wrapper data