02/28/2005
 

com.epicentric.task
Class Errand

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--com.epicentric.task.Errand
All Implemented Interfaces:
Runnable

Deprecated. As of version 4.0, to be removed in 8.0 or later. It has been replaced with TaskManager

public class Errand
extends Thread

Runs a task with or without a timeout. If task times out before completion, isInterrupted() will return true.


Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Errand(DirectTask task)
          Deprecated. Constructor.
Errand(DirectTask task, int timeout)
          Deprecated. Constructor.
Errand(DirectTask task, int timeout, String errand_name)
          Deprecated. Constructor.
Errand(DirectTask task, String errand_name)
          Deprecated. Constructor.
 
Method Summary
 boolean completedSuccessfully()
          Deprecated. Return whether task completed successfully.
 void run()
          Deprecated. Execute the task.
 boolean timedOut()
          Deprecated. Answer whether task timed out.
 boolean waitForCompletion()
          Deprecated. Wait until task finishes or times out.
 
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
 

Constructor Detail

Errand

public Errand(DirectTask task)
Deprecated. 
Constructor. No timeout.

Errand

public Errand(DirectTask task,
              String errand_name)
Deprecated. 
Constructor. Named task with no timeout.

Errand

public Errand(DirectTask task,
              int timeout)
Deprecated. 
Constructor. Uses a timeout.
Parameters:
task -  
timeout - in seconds.

Errand

public Errand(DirectTask task,
              int timeout,
              String errand_name)
Deprecated. 
Constructor. Uses a timeout and task name.
Parameters:
task -  
timeout - in seconds.
errand_name -  
Method Detail

run

public void run()
Deprecated. 
Execute the task.
Overrides:
run in class Thread

waitForCompletion

public boolean waitForCompletion()
Deprecated. 
Wait until task finishes or times out. Return whether it succeeded or not. Does not return whether or not task timed out. #see timedOut

completedSuccessfully

public boolean completedSuccessfully()
Deprecated. 
Return whether task completed successfully. Will wait for completion. #see waitForCompletion

timedOut

public boolean timedOut()
Deprecated. 
Answer whether task timed out.

02/28/2005
 

Copyright and Trademark Notices