|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.virtuosotechnologies.lib.asyncjob.AbstractAsyncJob
Abstract base implementation of AsyncJob. This provides a simple ModifiablePropertySet for manipulating the properties, and includes a basic interrupt() method indicating that the task cannot be interrupted. Subclasses must implement the run() method.
Field Summary |
Fields inherited from interface com.virtuosotechnologies.lib.asyncjob.AsyncJob |
CAN_CANCEL_PROPERTY, COMPLETED_PROGRESS_STRING_PROPERTY, FAILED_PROGRESS_STRING_PROPERTY, INDETERMINATE_PROGRESS, INITIAL_FRACTION_DONE_PROPERTY, INITIAL_PROGRESS_STRING_PROPERTY, JOB_NAME_PROPERTY, PRESTART_PROGRESS_STRING_PROPERTY |
Constructor Summary | |
protected |
AbstractAsyncJob()
Constructor. |
protected |
AbstractAsyncJob(PropertySet defaultProperties)
Constructor. |
protected |
AbstractAsyncJob(String jobName,
boolean canCancel)
Constructor. |
protected |
AbstractAsyncJob(String jobName,
boolean canCancel,
float initialFractionDone)
Constructor. |
protected |
AbstractAsyncJob(String jobName,
boolean canCancel,
float initialFractionDone,
String initialProgressString)
Constructor. |
protected |
AbstractAsyncJob(String jobName,
boolean canCancel,
float initialFractionDone,
String initialProgressString,
String preStartProgressString,
String completedProgressString,
String failedProgressString)
Constructor. |
Method Summary | |
protected ModifiablePropertySet |
getModifiableProperties()
Get a modifiable view of the properties for this AsyncJob. |
PropertySet |
getProperties()
Get the properties for this AsyncJob |
boolean |
interrupt(AsyncJobException exception)
Interrupt the job if it is currently running. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.virtuosotechnologies.lib.asyncjob.AsyncJob |
run |
Constructor Detail |
protected AbstractAsyncJob(PropertySet defaultProperties)
defaultProperties
- a PropertySet to use as the default properties for the
BasicModifiablePropertySet used for the job's properties.protected AbstractAsyncJob(String jobName, boolean canCancel, float initialFractionDone, String initialProgressString, String preStartProgressString, String completedProgressString, String failedProgressString)
jobName
- user-visible name for this job.canCancel
- true if this job can be canceled.initialFractionDone
- initial value for the fraction done in the progress reportinitialProgressString
- initial value for the user-visible string in the progress report.preStartProgressString
- the user-visible progress string for the pre-start state.completedProgressString
- the user-visible progress string for the completed state.failedProgressString
- the user-visible progress string for the failed state.protected AbstractAsyncJob(String jobName, boolean canCancel, float initialFractionDone, String initialProgressString)
jobName
- user-visible name for this job.canCancel
- true if this job can be canceled.initialFractionDone
- initial value for the fraction done in the progress reportinitialProgressString
- initial value for the user-visible string in the progress report.protected AbstractAsyncJob(String jobName, boolean canCancel, float initialFractionDone)
jobName
- user-visible name for this job.canCancel
- true if this job can be canceled.initialFractionDone
- initial value for the fraction done in the progress reportprotected AbstractAsyncJob(String jobName, boolean canCancel)
jobName
- user-visible name for this job.canCancel
- true if this job can be canceled.protected AbstractAsyncJob()
Method Detail |
public PropertySet getProperties()
getProperties
in interface AsyncJob
protected ModifiablePropertySet getModifiableProperties()
public boolean interrupt(AsyncJobException exception)
This default implementation returns false to indicate that the job cannot be interrupted.
interrupt
in interface AsyncJob
exception
- custom exception to throw
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |