类 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 base class for
ServerResponse implementations.- 从以下版本开始:
- 4.0
- 作者:
- Arjen Poutsma, Harry Yang
-
嵌套类概要
从接口继承的嵌套类/接口 cn.taketoday.web.handler.function.ServerResponse
ServerResponse.BodyBuilder, ServerResponse.Context, ServerResponse.HeadersBuilder<B extends ServerResponse.HeadersBuilder<B>>, ServerResponse.SseBuilder -
字段概要
字段修饰符和类型字段说明private final cn.taketoday.util.MultiValueMap<String,HttpCookie> private final HttpHeadersprivate static final Set<HttpMethod>private final HttpStatusCode从类继承的字段 cn.taketoday.web.handler.function.ErrorHandlingServerResponse
logger从接口继承的字段 cn.taketoday.web.handler.function.ServerResponse
NONE_RETURN_VALUE -
构造器概要
构造器限定符构造器说明protectedAbstractServerResponse(HttpStatusCode statusCode, HttpHeaders headers, cn.taketoday.util.MultiValueMap<String, HttpCookie> cookies) -
方法概要
修饰符和类型方法说明cn.taketoday.util.MultiValueMap<String,HttpCookie> cookies()Return the cookies of this response.final HttpHeadersheaders()Return the headers of this response.intReturn the status code of this response as integer.final HttpStatusCodeReturn the status code of this response.private voidwriteCookies(RequestContext context) private voidwriteHeaders(RequestContext context) private voidwriteStatusAndHeaders(RequestContext response) writeTo(RequestContext request, ServerResponse.Context context) Write this response to the given servlet response.protected abstract ObjectwriteToInternal(RequestContext request, ServerResponse.Context context) 从类继承的方法 cn.taketoday.web.handler.function.ErrorHandlingServerResponse
addErrorHandler, errorResponse, handleError
-
字段详细资料
-
SAFE_METHODS
-
statusCode
-
headers
-
cookies
-
-
构造器详细资料
-
AbstractServerResponse
protected AbstractServerResponse(HttpStatusCode statusCode, HttpHeaders headers, @Nullable cn.taketoday.util.MultiValueMap<String, HttpCookie> cookies)
-
-
方法详细资料
-
statusCode
从接口复制的说明:ServerResponseReturn the status code of this response.- 返回:
- the status as an HttpStatusCode value
-
rawStatusCode
public int rawStatusCode()从接口复制的说明:ServerResponseReturn the status code of this response as integer.- 返回:
- the status as an integer
-
headers
从接口复制的说明:ServerResponseReturn the headers of this response. -
cookies
从接口复制的说明:ServerResponseReturn the cookies of this response. -
writeTo
@Nullable public Object writeTo(RequestContext request, ServerResponse.Context context) throws Throwable 从接口复制的说明:ServerResponseWrite this response to the given servlet response.- 参数:
request- the current requestcontext- the context to use when writing- 返回:
- a Web result to render, or
nullif handled directly - 抛出:
Throwable
-
writeStatusAndHeaders
-
writeHeaders
-
writeCookies
-
writeToInternal
@Nullable protected abstract Object writeToInternal(RequestContext request, ServerResponse.Context context) throws Throwable - 抛出:
Throwable
-