open class WebAsyncTask<V : Any> : BeanFactoryAware
Holder for a Callable, a timeout value, and a task executor.
Author
Rossen Stoyanchev
Author
Juergen Hoeller
Since
3.2
WebAsyncTask(callable: Callable<V>)
Create a WebAsyncTask(timeout: Long, callable: Callable<V>)
Create a WebAsyncTask(timeout: Long, executorName: String, callable: Callable<V>)
Create a WebAsyncTask(timeout: Long, executor: AsyncTaskExecutor, callable: Callable<V>)
Create a |
open fun getCallable(): Callable<*>
Return the Callable to use for concurrent handling (never |
|
open fun getExecutor(): AsyncTaskExecutor
Return the AsyncTaskExecutor to use for concurrent handling, or |
|
open fun getTimeout(): Long
Return the timeout value in milliseconds, or |
|
open fun onCompletion(callback: Runnable): Unit
Register code to invoke when the async request completes. This method is called from a container thread when an async request completed for any reason, including timeout and network error. |
|
open fun onError(callback: Callable<V>): Unit
Register code to invoke for an error during async request processing. This method is called from a container thread when an error occurred while processing an async request before the |
|
open fun onTimeout(callback: Callable<V>): Unit
Register code to invoke when the async request times out. This method is called from a container thread when an async request times out before the |
|
open fun setBeanFactory(beanFactory: BeanFactory): Unit
A BeanFactory to use for resolving an executor name. This factory reference will automatically be set when |