use of cn.taketoday.web.context.async.DeferredResult in project today-infrastructure by TAKETODAY.
the class ErrorPageFilterTests method setUpAsyncDispatch.
private void setUpAsyncDispatch() throws Exception {
this.request.setAsyncSupported(true);
this.request.setAsyncStarted(true);
DeferredResult<String> result = new DeferredResult<>();
ServletRequestContext context = new ServletRequestContext(null, request, response);
WebAsyncManager asyncManager = WebAsyncUtils.getAsyncManager(context);
asyncManager.setAsyncRequest(new StandardServletAsyncWebRequest(context));
asyncManager.startDeferredResultProcessing(result);
}
use of cn.taketoday.web.context.async.DeferredResult in project today-framework by TAKETODAY.
the class ErrorPageFilterTests method setUpAsyncDispatch.
private void setUpAsyncDispatch() throws Exception {
this.request.setAsyncSupported(true);
this.request.setAsyncStarted(true);
DeferredResult<String> result = new DeferredResult<>();
ServletRequestContext context = new ServletRequestContext(null, request, response);
WebAsyncManager asyncManager = WebAsyncUtils.getAsyncManager(context);
asyncManager.setAsyncRequest(new StandardServletAsyncWebRequest(request, response));
asyncManager.startDeferredResultProcessing(result);
}
Aggregations