|
02/28/2005 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.lang.Thread
|
+--com.epicentric.task.TaskScheduler
TaskManager
TaskScheduler can iterate over scheduled tasks until there are no more to schedule, or until a shutdown time. To use, create an array of tasks. Instantiate the TaskScheduler, then start() it (to run on a thread) or run() it (to run on the current thread). It is recommended you run it on its own thread if the schedules for your tasks can cause TaskScheduler to sleep.
| Field Summary | |
protected Date |
runUntilDateTime
Deprecated. |
protected boolean |
shutdown
Deprecated. |
protected Task[] |
tasks
Deprecated. |
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
TaskScheduler(Task task)
Deprecated. Constructor. |
|
TaskScheduler(Task[] tasks)
Deprecated. Constructor for a TaskScheduler. |
|
| Method Summary | |
protected Task |
getNextTask()
Deprecated. Get the next scheduled task, removing any that don't need to be run any more. |
void |
run()
Deprecated. Evaluate the schedule of all tasks. |
void |
setPauseWhileWaitingForTask(long pauseForTaskCompletion)
Deprecated. Set how long, in milliseconds, to sleep while waiting for tasks to finish when no other tasks to run. |
void |
setReportWhenSleeping(boolean reportWhenSleeping)
Deprecated. Set whether or not to echo a message when going to sleep. |
void |
setRunUntilTime(Date runUntilDateTime)
Deprecated. Use date/time passed as a limiter on execution. |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected Task[] tasks
protected Date runUntilDateTime
protected boolean shutdown
| Constructor Detail |
public TaskScheduler(Task[] tasks)
tasks - Array of tasks to iterate over.public TaskScheduler(Task task)
| Method Detail |
public void run()
run in class Threadprotected Task getNextTask()
public void setRunUntilTime(Date runUntilDateTime)
runUntilDateTime - provides for shutdown. Can be null.public void setReportWhenSleeping(boolean reportWhenSleeping)
public void setPauseWhileWaitingForTask(long pauseForTaskCompletion)
|
02/28/2005 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||