public interface MvcResult
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getAsyncResult()
Get the result of async execution.
|
java.lang.Object |
getAsyncResult(long timeToWait)
Get the result of async execution and wait if necessary.
|
FlashMap |
getFlashMap()
Return the "output" flash attributes saved during request processing.
|
java.lang.Object |
getHandler()
Return the executed handler.
|
HandlerInterceptor[] |
getInterceptors()
Return interceptors around the handler.
|
ModelAndView |
getModelAndView()
Return the
ModelAndView prepared by the handler. |
MockHttpServletRequest |
getRequest()
Return the performed request.
|
java.lang.Exception |
getResolvedException()
Return any exception raised by a handler and successfully resolved
through a
HandlerExceptionResolver . |
MockHttpServletResponse |
getResponse()
Return the resulting response.
|
MockHttpServletRequest getRequest()
null
MockHttpServletResponse getResponse()
null
@Nullable java.lang.Object getHandler()
null
if none were executed@Nullable HandlerInterceptor[] getInterceptors()
null
if none were selected@Nullable ModelAndView getModelAndView()
ModelAndView
prepared by the handler.ModelAndView
, or null
if none@Nullable java.lang.Exception getResolvedException()
HandlerExceptionResolver
.null
if noneFlashMap getFlashMap()
FlashMap
, possibly emptyjava.lang.Object getAsyncResult()
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.
java.lang.IllegalStateException
- if the async result was not setjava.lang.Object getAsyncResult(long timeToWait)
timeToWait
- how long to wait for the async result to be set, in
milliseconds; if -1, then fall back on the timeout value associated with
the async request, see
MockAsyncContext#setTimeout
for more details.java.lang.IllegalStateException
- if the async result was not set