|
Jive Forums API (5.5.8) Developer Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jivesoftware.util.AbstractPollableRunnable
public abstract class AbstractPollableRunnable
An abstract implementation of the PollableRunnable interface. This preconfigures a 0->100
determinate progress meter and has a simple implementation of the run() method.
Developers need only to override the getTaskValue() method and the doRun() method.
| Constructor Summary | |
|---|---|
AbstractPollableRunnable()
|
|
| Method Summary | |
|---|---|
void |
cancel()
Not implemented in this implementation. |
abstract void |
doRun()
Executes the logic of the task. |
java.util.Date |
getEndDate()
Returns the date the task ended. |
double |
getPercentComplete()
Returns the percent complete of the task as a double value between 0.0 and 100.0. |
java.util.Date |
getStartDate()
Returns the date the task was started. |
int |
getTaskMaximum()
Returns the maximum value of task progress (default is 100). |
int |
getTaskMinimum()
Returns the minimum value of task progress (default is 0). |
abstract int |
getTaskValue()
Returns the current value of the task's progress. |
boolean |
isFinished()
A simple call back method which will be called when the task has completed. |
boolean |
isIndeterminate()
Returns true if we are unable to determine the progress being made, false othewise. |
boolean |
isRunning()
Returns true if the task is running, false otherwise. |
void |
run()
A simple implementation of the Runnable.run() method which sets this
task's running status to true then calls the abstract method doRun(). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractPollableRunnable()
| Method Detail |
|---|
public boolean isRunning()
PollableRunnable
isRunning in interface PollableRunnablepublic int getTaskMinimum()
PollableRunnableindeterminate mode then this will return -1.
getTaskMinimum in interface PollableRunnablepublic int getTaskMaximum()
PollableRunnableindeterminate mode then this will return -1.
getTaskMaximum in interface PollableRunnablepublic abstract int getTaskValue()
PollableRunnableindeterminate mode then this will return -1.
getTaskValue in interface PollableRunnablepublic java.util.Date getStartDate()
PollableRunnable
getStartDate in interface PollableRunnablepublic java.util.Date getEndDate()
PollableRunnable
getEndDate in interface PollableRunnablepublic double getPercentComplete()
PollableRunnableindeterminate mode then this will return -1.
getPercentComplete in interface PollableRunnablepublic boolean isIndeterminate()
PollableRunnable
isIndeterminate in interface PollableRunnablepublic boolean isFinished()
PollableRunnable
isFinished in interface PollableRunnablepublic void cancel()
cancel in interface PollableRunnablepublic final void run()
Runnable.run() method which sets this
task's running status to true then calls the abstract method doRun(). When
doRun() returns it will set the running status to false then call the
isFinished() callback. Note, this method is final so it cannot be subclassed - it will call doRun() which is abstract and must be implemented by subclasses.
run in interface java.lang.Runnablepublic abstract void doRun()
|
Jive Forums Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||