类 WebAsyncManagerFactory

java.lang.Object
cn.taketoday.web.context.async.WebAsyncManagerFactory

public class WebAsyncManagerFactory extends Object
WebAsyncManager Factory
从以下版本开始:
4.0 2022/12/3 22:26
作者:
Harry Yang
  • 字段详细资料

    • log

      private static final cn.taketoday.logging.Logger log
    • callableInterceptors

      private CallableProcessingInterceptor[] callableInterceptors
    • deferredResultInterceptors

      private DeferredResultProcessingInterceptor[] deferredResultInterceptors
    • asyncRequestTimeout

      @Nullable private Long asyncRequestTimeout
    • taskExecutor

      private cn.taketoday.core.task.AsyncTaskExecutor taskExecutor
  • 构造器详细资料

    • WebAsyncManagerFactory

      public WebAsyncManagerFactory()
  • 方法详细资料

    • setTaskExecutor

      public void setTaskExecutor(cn.taketoday.core.task.AsyncTaskExecutor taskExecutor)
      Set the default AsyncTaskExecutor to use when a controller method return a Callable. Controller methods can override this default on a per-request basis by returning an WebAsyncTask.

      If your application has controllers with such return types, please configure an AsyncTaskExecutor as the one used by default is not suitable for production under load.

    • setAsyncRequestTimeout

      public void setAsyncRequestTimeout(long timeout)
      Specify the amount of time, in milliseconds, before concurrent handling should time out. In Servlet 3, the timeout begins after the main request processing thread has exited and ends when the request is dispatched again for further processing of the concurrently produced result.

      If this value is not set, the default timeout of the underlying implementation is used.

      参数:
      timeout - the timeout value in milliseconds
    • setCallableInterceptors

      public void setCallableInterceptors(List<CallableProcessingInterceptor> interceptors)
      Configure CallableProcessingInterceptor's to register on async requests.
      参数:
      interceptors - the interceptors to register
    • setDeferredResultInterceptors

      public void setDeferredResultInterceptors(List<DeferredResultProcessingInterceptor> interceptors)
      Configure DeferredResultProcessingInterceptor's to register on async requests.
      参数:
      interceptors - the interceptors to register
    • getWebAsyncManager

      public WebAsyncManager getWebAsyncManager(RequestContext request)
    • find

      public static WebAsyncManagerFactory find(cn.taketoday.context.ApplicationContext context)