public class AsyncScheduler
extends java.lang.Object
AsyncScheduler is a part of a basic API to allow
 scheduling asynchronous tasks that support cancelling while the
 task is running.  It is recommended that JSR 166 be used when
 it becomes available as part of the JDK later. This scheduler schedules background threads to complete queued tasks. If there are no tasks queued, the background threads will exit.
| Constructor and Description | 
|---|
AsyncScheduler(java.lang.String runnerPrefix,
              int idleTimeout)
Construct a new  
AsyncScheduler. | 
AsyncScheduler(java.lang.String runnerPrefix,
              int idleTimeout,
              int maxThreads)
Construct a new  
AsyncScheduler. | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
cancelTask(AsyncTask task)
Cancel a pending task. 
 | 
void | 
scheduleTask(AsyncTask task)
Schedule a new task. 
 | 
public AsyncScheduler(java.lang.String runnerPrefix,
                      int idleTimeout)
AsyncScheduler.runnerPrefix - the prefix name for the runner threadsidleTimeout - the idle timeout that an idle thread waits before
        exitingpublic AsyncScheduler(java.lang.String runnerPrefix,
                      int idleTimeout,
                      int maxThreads)
AsyncScheduler.runnerPrefix - the prefix name for the runner threadsidleTimeout - the idle timeout that an idle thread waits before
        exitingmaxThreads - the number of concurrent max possible threads