|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread gov.bnl.star.offline.scheduler.util.Task
public class Task
A task that is going to be executed in a separate thread while displaying a character every second on the standard output.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
protected int |
exitStatus
The exit status of the process. |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
Task()
A new task to be executed in background. |
|
Task(char waitingDot)
A new task to be executed in background. |
|
Task(char waitingDot,
int msTimeout)
A new task to be executed in background with a timeout. |
|
Task(int msTimeout)
A new task to be executed in background with a timeout. |
Method Summary | |
---|---|
void |
execute()
Starts the task and wait for the result. |
int |
getExitStatus()
Returns the condition on which the task finished. |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, 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 int exitStatus
Constructor Detail |
---|
public Task()
public Task(char waitingDot)
waitingDot
- character to display every second while waiting for the task to finishpublic Task(int msTimeout)
msTimeout
- timeout in millisecondspublic Task(char waitingDot, int msTimeout)
waitingDot
- character to display every second while waiting for the task to finishmsTimeout
- timeout in millisecondsMethod Detail |
---|
public int getExitStatus()
public void execute()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |