类 PrintingResultHandler
java.lang.Object
cn.taketoday.test.web.servlet.result.PrintingResultHandler
- 所有已实现的接口:
ResultHandler
Result handler that prints
MvcResult details to a given output
stream — for example: System.out, System.err, a
custom java.io.PrintWriter, etc.
An instance of this class is typically accessed via one of the
print or log
methods in MockMvcResultHandlers.
- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev, Sam Brannen
-
嵌套类概要
嵌套类修饰符和类型类说明protected static interfaceA contract for how to actually write result information. -
字段概要
字段 -
构造器概要
构造器限定符构造器说明protectedProtected constructor. -
方法概要
修饰符和类型方法说明protected PrintingResultHandler.ResultValuePrinterReturn the result value printer.protected final cn.taketoday.http.HttpHeadersgetRequestHeaders(MockHttpServletRequest request) protected final cn.taketoday.http.HttpHeadersgetResponseHeaders(MockHttpServletResponse response) final voidPrintMvcResultdetails.protected voidprintAsyncResult(MvcResult result) private voidprintCookies(jakarta.servlet.http.Cookie[] cookies) Print the supplied cookies in a human-readable form, assuming theCookieimplementation does not provide its owntoString().protected voidprintFlashMap(cn.taketoday.web.view.RedirectModel flashMap) Print "output" flash attributes.protected voidprintHandler(Object handler, cn.taketoday.web.HandlerInterceptor[] interceptors) Print the handler.protected voidprintModelAndView(cn.taketoday.web.view.ModelAndView mav) Print the ModelAndView.protected voidprintRequest(MockHttpServletRequest request) Print the request.protected voidprintResolvedException(Throwable resolvedException) Print exceptions resolved through a HandlerExceptionHandler.protected voidprintResponse(MockHttpServletResponse response) Print the response.
-
字段详细资料
-
MISSING_CHARACTER_ENCODING
- 另请参阅:
-
printer
-
-
构造器详细资料
-
PrintingResultHandler
Protected constructor.- 参数:
printer- aPrintingResultHandler.ResultValuePrinterto do the actual writing
-
-
方法详细资料
-
getPrinter
Return the result value printer.- 返回:
- the printer
-
handle
PrintMvcResultdetails.- 指定者:
handle在接口中ResultHandler- 参数:
result- the result of the executed request- 抛出:
Exception- if a failure occurs
-
printRequest
Print the request.- 抛出:
Exception
-
getRequestHeaders
-
getParamsMultiValueMap
protected final cn.taketoday.util.MultiValueMap<String,String> getParamsMultiValueMap(MockHttpServletRequest request) -
getSessionAttributes
-
printAsyncResult
- 抛出:
Exception
-
printHandler
protected void printHandler(@Nullable Object handler, @Nullable cn.taketoday.web.HandlerInterceptor[] interceptors) throws Exception Print the handler.- 抛出:
Exception
-
printResolvedException
Print exceptions resolved through a HandlerExceptionHandler.- 抛出:
Exception
-
printModelAndView
Print the ModelAndView.- 抛出:
Exception
-
printFlashMap
Print "output" flash attributes.- 抛出:
Exception
-
printResponse
Print the response.- 抛出:
Exception
-
printCookies
private void printCookies(jakarta.servlet.http.Cookie[] cookies) Print the supplied cookies in a human-readable form, assuming theCookieimplementation does not provide its owntoString().- 从以下版本开始:
- 4.0
-
getResponseHeaders
-