public interface IJob extends IControlledThread, HasRIcon
Running instances created and returned by the API appear in the Running Jobs dialog inside Scelight.
Example usage of IJob
:
// Use an image stored next to this class as the job icon: IRIcon ricon = factory.newRIcon( getClass().getResource( "job-icon.png" ) ); IJob job; // If your runnable needs the reference: must be instance attribute or else a reference wrapper job = factory.newJob( "Italian Job", ricon, new Runnable() { public void run() { System.out.println( "I am a Job, doing the job." ); } } ); // Start the job: job.start();
IFactory.newJob(String, IRIcon, Runnable)
,
IProgressJob
Modifier and Type | Method and Description |
---|---|
java.util.Date |
getStartedAt()
Returns the job execution start time.
|
void |
setCallback(java.lang.Runnable callback)
Sets the callback to be called when job is done.
|
void |
setEdtCallback(java.lang.Runnable edtCallback)
Sets the callback to be called in the EDT when job is done.
|
java.lang.String |
toString()
Overridden to return the job's name.
|
close, getControlledState, getExecTimeMs, getPausedTimeMs, guestMayContinue, guestWaitIfPaused, isCancelRequested, isPauseRequested, mayContinue, requestCancel, requestPause, requestUnpause, waitIfPaused
asThread, checkedSleep, start, waitToFinish
void setCallback(java.lang.Runnable callback)
callback
- callback to be setvoid setEdtCallback(java.lang.Runnable edtCallback)
edtCallback
- EDT callback to be setjava.util.Date getStartedAt()
java.lang.String toString()
toString
in class java.lang.Object
This API documentation is public and is intended for / allowed to be used by anyone.
Scelight home page: https://sites.google.com/site/scelight/
Scelight is a trademark of András Belicza. Copyright © András Belicza, 2013-2015. All rights reserved.