类 AbstractServerResponse

java.lang.Object
cn.taketoday.web.handler.function.ErrorHandlingServerResponse
cn.taketoday.web.handler.function.AbstractServerResponse
所有已实现的接口:
ServerResponse
直接已知子类:
DefaultEntityResponseBuilder.DefaultEntityResponse, DefaultRenderingResponseBuilder.DefaultRenderingResponse, DefaultServerResponseBuilder.WriteFunctionResponse, ModelAndViewRenderingResponseBuilder.ModelAndViewRenderingResponse, SseServerResponse

abstract class AbstractServerResponse extends ErrorHandlingServerResponse
Abstract base class for ServerResponse implementations.
从以下版本开始:
4.0
作者:
Arjen Poutsma, Harry Yang
  • 字段详细资料

  • 构造器详细资料

  • 方法详细资料

    • statusCode

      public final HttpStatusCode statusCode()
      从接口复制的说明: ServerResponse
      Return the status code of this response.
      返回:
      the status as an HttpStatusCode value
    • rawStatusCode

      public int rawStatusCode()
      从接口复制的说明: ServerResponse
      Return the status code of this response as integer.
      返回:
      the status as an integer
    • headers

      public final HttpHeaders headers()
      从接口复制的说明: ServerResponse
      Return the headers of this response.
    • cookies

      public cn.taketoday.util.MultiValueMap<String,HttpCookie> cookies()
      从接口复制的说明: ServerResponse
      Return the cookies of this response.
    • writeTo

      @Nullable public Object writeTo(RequestContext request, ServerResponse.Context context) throws Throwable
      从接口复制的说明: ServerResponse
      Write this response to the given servlet response.
      参数:
      request - the current request
      context - the context to use when writing
      返回:
      a Web result to render, or null if handled directly
      抛出:
      Throwable
    • writeStatusAndHeaders

      private void writeStatusAndHeaders(RequestContext response)
    • writeHeaders

      private void writeHeaders(RequestContext context)
    • writeCookies

      private void writeCookies(RequestContext context)
    • writeToInternal

      @Nullable protected abstract Object writeToInternal(RequestContext request, ServerResponse.Context context) throws Throwable
      抛出:
      Throwable