Class SPRunner<T>
java.lang.Object
com.inductiveautomation.rm.base.RMListenerList
com.inductiveautomation.rm.base.RMObject
com.inductiveautomation.snap.util.SPRunner<T>
- All Implemented Interfaces:
- RMPropertyChanger,- Cloneable
- Direct Known Subclasses:
- SwingRunner
A class for running operations in the background.
- 
Nested Class SummaryNested Classes
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidcancel()Cancels the runner.voidThe method to run when cancelled.voidThe method to run on failure.voidfinished()The method to run when finished (after success()/failure() call).Returns a description of the current activity beging performed.longReturns the elapsed time.longReturns the end time.Returns the exception.getName()Returns the name of runner (and thread).doubleReturns the progress value.Returns the result.longReturns the start time.Returns the status.protected longReturns the system time.Returns the thread.protected voidRuns the success method.protected voidRuns the run method.booleanisActive()Returns whether thread is still active.booleanWhether runner has been cancelled.join()Joins the runner.join(int aTimeout) Joins the runner.abstract Trun()The method to run.voidsetActivityText(String aString) Sets a description of the current activity beging performed.voidSets the name of runner (and thread).voidsetProgress(double aValue) Sets the progress value.protected voidsetStatus(SPRunner.Status aStatus) Sets the status.start()Starts the runner.voidThe method run on success.Methods inherited from class com.inductiveautomation.rm.base.RMObjectaddPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange, toStringMethods inherited from class com.inductiveautomation.rm.base.RMListenerListaddListener, clone, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
- 
Field Details- 
Progress_Prop- See Also:
 
- 
ActivityText_Prop- See Also:
 
- 
Status_Prop- See Also:
 
 
- 
- 
Constructor Details- 
SPRunnerpublic SPRunner()
 
- 
- 
Method Details- 
getProgresspublic double getProgress()Returns the progress value.
- 
setProgresspublic void setProgress(double aValue) Sets the progress value.
- 
getNameReturns the name of runner (and thread).
- 
setNameSets the name of runner (and thread).
- 
getActivityTextReturns a description of the current activity beging performed.
- 
setActivityTextSets a description of the current activity beging performed.
- 
getStatusReturns the status.
- 
setStatusSets the status.
- 
getThreadReturns the thread.
- 
joinJoins the runner.
- 
joinJoins the runner.
- 
isActivepublic boolean isActive()Returns whether thread is still active.
- 
isCancelledpublic boolean isCancelled()Whether runner has been cancelled.
- 
getStartTimepublic long getStartTime()Returns the start time.
- 
getEndTimepublic long getEndTime()Returns the end time.
- 
getElapsedTimepublic long getElapsedTime()Returns the elapsed time.
- 
getSystemTimeprotected long getSystemTime()Returns the system time.
- 
startStarts the runner.
- 
cancelpublic void cancel()Cancels the runner.
- 
runThe method to run.- Throws:
- Exception
 
- 
successThe method run on success.
- 
cancelledThe method to run when cancelled.
- 
failureThe method to run on failure.
- 
finishedpublic void finished()The method to run when finished (after success()/failure() call).
- 
getResultReturns the result.
- 
getExeptionReturns the exception.
- 
invokeRunprotected void invokeRun()Runs the run method.
- 
invokeFinishedprotected void invokeFinished()Runs the success method.
 
-