public abstract class RMActivity extends RMObject implements java.lang.Runnable, RMUtils.ProgressListener
Modifier and Type | Class and Description |
---|---|
static class |
RMActivity.Status |
Constructor and Description |
---|
RMActivity() |
Modifier and Type | Method and Description |
---|---|
RMLogger |
createLogger()
Creates the default activity logger.
|
java.lang.Throwable |
getError()
Returns the error (throwable) if one was generated from last run.
|
java.lang.StringBuffer |
getLog()
Returns the activity log.
|
RMLogger |
getLogger()
Returns the activity logger.
|
java.lang.String |
getLogString()
Returns the activity log string.
|
float |
getMaxProgress()
Returns the max progress value.
|
java.lang.String |
getName()
Returns the activity name.
|
float |
getProgress()
Returns the current progress value.
|
RMActivity.Status |
getStatus()
Returns the activity status.
|
java.lang.String |
getTaskName()
Returns the current task name.
|
java.lang.Thread |
getThread()
Returns the thread associated with this activity.
|
void |
interrupt()
Interrupts the activity thread.
|
boolean |
isIndeterminant()
Returns whether activity progress is indeterminant (max progres is zero).
|
void |
println(java.lang.String aString)
Called when activity has something to say (forwards to listeners).
|
abstract void |
run()
This is the primary run method which should contain only the custom run tasks.
|
void |
runActivity()
This method runs the activity, in the current thread.
|
void |
setError(java.lang.Throwable anError)
Sets the error (throwable) if one was generated from last run.
|
void |
setLogger(RMLogger aLogger)
Sets the activity logger.
|
void |
setMaxProgress(float aValue)
Sets the maximum progress value.
|
void |
setName(java.lang.String aName)
Sets the activity name.
|
void |
setProgress(float aValue)
Sets the current progress value.
|
void |
setStatus(RMActivity.Status aStatus)
Sets the activity status.
|
void |
setTaskName(java.lang.String aName)
Sets the current task name.
|
void |
start()
Starts the activity in a separate thread.
|
addPropertyChangeListener, animUpdate, removePropertyChangeListener, toString
addListener, clone, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
public java.lang.String getName()
public void setName(java.lang.String aName)
public RMActivity.Status getStatus()
public void setStatus(RMActivity.Status aStatus)
public java.lang.String getTaskName()
public void setTaskName(java.lang.String aName)
public float getProgress()
getProgress
in interface RMUtils.ProgressListener
public void setProgress(float aValue)
setProgress
in interface RMUtils.ProgressListener
public float getMaxProgress()
getMaxProgress
in interface RMUtils.ProgressListener
public void setMaxProgress(float aValue)
setMaxProgress
in interface RMUtils.ProgressListener
public boolean isIndeterminant()
public RMLogger getLogger()
public void setLogger(RMLogger aLogger)
public RMLogger createLogger()
public java.lang.StringBuffer getLog()
public java.lang.String getLogString()
public java.lang.Thread getThread()
public java.lang.Throwable getError()
public void setError(java.lang.Throwable anError)
public void runActivity()
public abstract void run()
run
in interface java.lang.Runnable
public void start()
public void interrupt()
public void println(java.lang.String aString)