use of org.springframework.web.context.request.async.DeferredResult in project spring-boot by spring-projects.
the class ErrorPageFilterTests method setUpAsyncDispatch.
private void setUpAsyncDispatch() throws Exception {
this.request.setAsyncSupported(true);
this.request.setAsyncStarted(true);
DeferredResult<String> result = new DeferredResult<>();
WebAsyncManager asyncManager = WebAsyncUtils.getAsyncManager(this.request);
asyncManager.setAsyncWebRequest(new StandardServletAsyncWebRequest(this.request, this.response));
asyncManager.startDeferredResultProcessing(result);
}
Aggregations