public class AsyncTask
extends java.lang.Object
Callable, a timeout value, and a task executor.| Constructor and Description |
|---|
AsyncTask(java.lang.Long timeout,
AsyncTaskExecutor executor,
java.util.concurrent.Callable<?> callable)
Create an AsyncTask with a timeout value, an executor instance, and a Callable.
|
AsyncTask(long timeout,
java.util.concurrent.Callable<?> callable)
Create an AsyncTask with a timeout value and a Callable.
|
AsyncTask(java.lang.Long timeout,
java.lang.String executorName,
java.util.concurrent.Callable<?> callable)
Create an AsyncTask with a timeout value, an executor name, and a Callable.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.concurrent.Callable<?> |
getCallable()
Return the
Callable to use for concurrent handling, never null. |
AsyncTaskExecutor |
getExecutor()
Return the AsyncTaskExecutor to use for concurrent handling, or
null. |
java.lang.Long |
getTimeout()
Return the timeout value in milliseconds or
null if not value is set. |
void |
setBeanFactory(BeanFactory beanFactory)
A
BeanFactory to use to resolve an executor name. |
public AsyncTask(long timeout,
java.util.concurrent.Callable<?> callable)
timeout - timeout value in millisecondscallable - the callable for concurrent handlingpublic AsyncTask(java.lang.Long timeout,
java.lang.String executorName,
java.util.concurrent.Callable<?> callable)
timeout - timeout value in milliseconds; ignored if nullcallable - the callable for concurrent handlingpublic AsyncTask(java.lang.Long timeout,
AsyncTaskExecutor executor,
java.util.concurrent.Callable<?> callable)
timeout - timeout value in milliseconds; ignored if nullcallable - the callable for concurrent handlingpublic java.util.concurrent.Callable<?> getCallable()
Callable to use for concurrent handling, never null.public java.lang.Long getTimeout()
null if not value is set.public AsyncTaskExecutor getExecutor()
null.public void setBeanFactory(BeanFactory beanFactory)
BeanFactory to use to resolve an executor name. Applications are
not expected to have to set this property when AsyncTask is used in a
Spring MVC controller.