|
uPortal 2.4.1 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jasig.portal.utils.threading.WorkerTask
The WorkerTask class should be extended by any class that will be executed by a ThreadPool.
Constructor Summary | |
WorkerTask()
|
Method Summary | |
void |
deregisterTracker()
Disassociates the WorkerTracker associated with this task. |
java.lang.Exception |
getException()
Returns the exception thrown in the run method, assuming it was set using setException |
Worker |
getWorker()
Gets the worker associated with this task |
WorkTracker |
getWorkTracker()
Gets the WorkTracker associated with this task |
boolean |
hasException()
Checks if this task has had an exception |
void |
kill()
Kills this task |
abstract void |
run()
The work of a WorkerTask |
void |
setException(java.lang.Exception e)
Should be called in the run method to set an exception that occured while executing |
void |
setWorker(Worker worker)
Sets the worker associated with this task |
void |
setWorkTracker(WorkTracker tracker)
Sets the tracker associated with this task |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WorkerTask()
Method Detail |
public abstract void run()
run
in interface java.lang.Runnable
public void setException(java.lang.Exception e)
e
- the exception encountered in the run methodpublic final java.lang.Exception getException()
public final void setWorker(Worker worker)
worker
- the Worker currently performing this taskpublic final Worker getWorker()
public final void setWorkTracker(WorkTracker tracker)
tracker
- The WorkTracker associated with this taskpublic final WorkTracker getWorkTracker()
public final boolean hasException()
public final void deregisterTracker()
public final void kill()
|
uPortal 2.4.1 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |