public class PrintingResultHandler extends java.lang.Object implements ResultHandler
MvcResult の詳細を特定の出力ストリームに出力する結果ハンドラー - 例: System.out、System.err、カスタム java.io.PrintWriter など。 このクラスのインスタンスは、通常、MockMvcResultHandlers の print または log メソッドのいずれかを介してアクセスされます。
| 修飾子と型 | クラスと説明 |
|---|---|
protected static interface | PrintingResultHandler.ResultValuePrinter 結果情報を実際に書き込む方法の契約。 |
| 修飾子 | コンストラクターと説明 |
|---|---|
protected | PrintingResultHandler(PrintingResultHandler.ResultValuePrinter printer)protected コンストラクター。 |
| 修飾子と型 | メソッドと説明 |
|---|---|
protected MultiValueMap<java.lang.String,java.lang.String> | getParamsMultiValueMap(MockHttpServletRequest request) |
protected PrintingResultHandler.ResultValuePrinter | getPrinter() 結果値プリンターを返します。 |
protected HttpHeaders | getRequestHeaders(MockHttpServletRequest request) |
protected HttpHeaders | getResponseHeaders(MockHttpServletResponse response) |
protected java.util.Map<java.lang.String,java.lang.Object> | getSessionAttributes(MockHttpServletRequest request) |
void | handle(MvcResult result)MvcResult の詳細を出力します。 |
protected void | printAsyncResult(MvcResult result) |
protected void | printFlashMap(FlashMap flashMap)「出力」フラッシュ属性を出力します。 |
protected void | printHandler(java.lang.Object handler, HandlerInterceptor[] interceptors) ハンドラーを出力します。 |
protected void | printModelAndView(ModelAndView mav)ModelAndView を出力します。 |
protected void | printRequest(MockHttpServletRequest request) リクエストを出力します。 |
protected void | printResolvedException(java.lang.Exception resolvedException)HandlerExceptionResolver によって解決された例外を出力します。 |
protected void | printResponse(MockHttpServletResponse response) レスポンスを出力します。 |
protected PrintingResultHandler(PrintingResultHandler.ResultValuePrinter printer)
printer - 実際の書き込みを行う PrintingResultHandler.ResultValuePrinterprotected PrintingResultHandler.ResultValuePrinter getPrinter()
public final void handle(MvcResult result) throws java.lang.Exception
MvcResult の詳細を出力します。ResultHandler 内の handle result - 実行されたリクエストの結果 java.lang.Exception - 障害が発生した場合 protected void printRequest(MockHttpServletRequest request) throws java.lang.Exception
java.lang.Exceptionprotected final HttpHeaders getRequestHeaders(MockHttpServletRequest request)
protected final MultiValueMap<java.lang.String,java.lang.String> getParamsMultiValueMap(MockHttpServletRequest request)
protected final java.util.Map<java.lang.String,java.lang.Object> getSessionAttributes(MockHttpServletRequest request)
protected void printAsyncResult(MvcResult result) throws java.lang.Exception
java.lang.Exceptionprotected void printHandler(@Nullable java.lang.Object handler, @Nullable HandlerInterceptor[] interceptors) throws java.lang.Exception
java.lang.Exceptionprotected void printResolvedException(@Nullable java.lang.Exception resolvedException) throws java.lang.Exception
java.lang.Exceptionprotected void printModelAndView(@Nullable ModelAndView mav) throws java.lang.Exception
java.lang.Exceptionprotected void printFlashMap(FlashMap flashMap) throws java.lang.Exception
java.lang.Exceptionprotected void printResponse(MockHttpServletResponse response) throws java.lang.Exception
java.lang.Exceptionprotected final HttpHeaders getResponseHeaders(MockHttpServletResponse response)