public interface MvcResult
Provides access to the result of an executed request.
- Rossen Stoyanchev
Method SummaryModifier and TypeMethodDescriptionGet the result of async execution.
(long timeToWait)Get the result of async execution and wait if necessary.Return the "output" flash attributes saved during request processing.Return the executed handler.Return interceptors around the handler.Return the
ModelAndViewprepared by the handler.Return the performed request.Return any exception raised by a handler and successfully resolved through a
HandlerExceptionResolver.Return the resulting response.
getRequestMockHttpServletRequest getRequest()Return the performed request.
- the request, never
getResponseMockHttpServletResponse getResponse()Return the resulting response.
- the response, never
getHandlerReturn the executed handler.
- the handler, possibly
nullif none were executed
getInterceptorsReturn interceptors around the handler.
- interceptors, or
nullif none were selected
ModelAndViewprepared by the handler.
getResolvedExceptionReturn any exception raised by a handler and successfully resolved through a
- an exception, or
getFlashMapFlashMap getFlashMap()Return the "output" flash attributes saved during request processing.
FlashMap, possibly empty
getAsyncResultObject getAsyncResult()Get the result of async execution.
This method will wait for the async result to be set within the timeout value associated with the async request, see
MockAsyncContext#setTimeout. Alternatively, use
getAsyncResult(long)to specify the amount of time to wait.
IllegalStateException- if the async result was not set
(long timeToWait)Get the result of async execution and wait if necessary.