|
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.WorkTracker
This class allows WorkerTasks to be tracked and stopped.
Field Summary | |
static int |
DONE
|
static int |
KILLED
|
static int |
READY
|
static int |
RUNNING
|
Constructor Summary | |
WorkTracker(WorkerTask task)
WorkTracker Constructor |
Method Summary | |
void |
deregisterWork()
De-associated this tracker with it's current task. |
java.lang.Exception |
getException()
Gets the exception encountered by the task this tracker is associated with |
int |
getState()
Gets the state of the task associated with this tracker |
boolean |
isJobComplete()
Checks to see if the task associated with this tracker is complete |
boolean |
isJobSuccessful()
Checks if task this tracker is associated with has completed successfully Note, a job will never have a chance to be successful until it has completed. |
void |
killJob()
Kills the task associated with tracker |
java.lang.String |
toString()
Returns a string representaiton of this task giving it's state, the job success status, and the exception if there is any. |
void |
updateStatus(int state,
boolean succcessful,
java.lang.Exception exception)
Updates the status of this tracker, and notifies all threads waiting on this object. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int READY
public static final int RUNNING
public static final int DONE
public static final int KILLED
Constructor Detail |
public WorkTracker(WorkerTask task)
task
- the task this tracker is associated withMethod Detail |
public void updateStatus(int state, boolean succcessful, java.lang.Exception exception)
state
- the current state of the task associated with this trackersucccessful
- whether the task associated with this tracker has been completed succesfullyexception
- the exception thrown by the task associated with this trackerpublic void killJob()
public java.lang.Exception getException()
public boolean isJobSuccessful()
public boolean isJobComplete()
public int getState()
public void deregisterWork()
public java.lang.String toString()
|
uPortal 2.4.1 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |