接口 ReactiveHttpOutputMessage

所有超级接口:
HttpMessage
所有已知子接口:
ClientHttpRequest, ServerHttpResponse, ZeroCopyHttpOutputMessage
所有已知实现类:
AbstractClientHttpRequest, AbstractListenerServerHttpResponse, AbstractServerHttpResponse, ClientHttpRequestDecorator, HttpComponentsClientHttpRequest, HttpHeadResponseDecorator, JdkClientHttpRequest, JettyClientHttpRequest, JettyHttpHandlerAdapter.Jetty12ServerHttpResponse, MultipartHttpMessageWriter.MultipartHttpOutputMessage, ReactorClientHttpRequest, ReactorNetty2ClientHttpRequest, ReactorNetty2ServerHttpResponse, ReactorServerHttpResponse, ServerHttpResponseDecorator, ServletServerHttpResponse, TomcatHttpHandlerAdapter.TomcatServerHttpResponse, UndertowServerHttpResponse

public interface ReactiveHttpOutputMessage extends HttpMessage
A "reactive" HTTP output message that accepts output as a Publisher.

Typically implemented by an HTTP request on the client-side or an HTTP response on the server-side.

从以下版本开始:
4.0
作者:
Arjen Poutsma, Sebastien Deleuze
  • 方法概要

    修饰符和类型
    方法
    说明
    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.
    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.

    从接口继承的方法 cn.taketoday.http.HttpMessage

    getHeaders
  • 方法详细资料

    • bufferFactory

      cn.taketoday.core.io.buffer.DataBufferFactory bufferFactory()
      Return a DataBufferFactory that can be used to create the body.
      返回:
      a buffer factory
      另请参阅:
    • beforeCommit

      void beforeCommit(Supplier<? extends reactor.core.publisher.Mono<Void>> action)
      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.

      参数:
      action - the action to apply
    • isCommitted

      boolean isCommitted()
      Whether the HttpOutputMessage is committed.
    • writeWith

      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.
      参数:
      body - the body content publisher
      返回:
      a Mono that indicates completion or error
    • writeAndFlushWith

      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>.
      参数:
      body - the body content publisher
      返回:
      a Mono that indicates completion or error
    • setComplete

      reactor.core.publisher.Mono<Void> setComplete()
      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.

      返回:
      a Mono that indicates completion or error