edu.sc.seis.fissuresUtil.cache
Interface Job

All Known Implementing Classes:
AbstractJob, UpdateCheckerJob

public interface Job


Field Summary
static java.lang.String FINISHED
          String used to set status when a task is finished
static java.lang.String INITIALIZE
           
 
Method Summary
 void add(StatusListener listener)
          Method setStatusListener adds a status listener to this Process that will be notified whenver the status changes
 java.lang.String getName()
          Method getName returns a name for this process that succinctly describes its action
 java.lang.String getStatus()
          Method getStatus is used to indicate the current status of this long running process
 boolean isFinished()
          Method finished allows a process monitor to know if the process is finished.
 void runJob()
          run acts like the run method of Runnable, but is wrapped by the Job system so that any exceptions are caught and the job is set to finished.
 

Field Detail

FINISHED

static final java.lang.String FINISHED
String used to set status when a task is finished

See Also:
Constant Field Values

INITIALIZE

static final java.lang.String INITIALIZE
See Also:
Constant Field Values
Method Detail

getStatus

java.lang.String getStatus()
Method getStatus is used to indicate the current status of this long running process

Returns:
a String describing what this process is up to at the current time

runJob

void runJob()
run acts like the run method of Runnable, but is wrapped by the Job system so that any exceptions are caught and the job is set to finished. This prevents the "flashing forever" case seen often in GEE.


getName

java.lang.String getName()
Method getName returns a name for this process that succinctly describes its action

Returns:
a String naming this process. If the string is more than 30 characters it will be truncated

add

void add(StatusListener listener)
Method setStatusListener adds a status listener to this Process that will be notified whenver the status changes


isFinished

boolean isFinished()
Method finished allows a process monitor to know if the process is finished. When finished is set to true, a status changed message is fired to all StatusListeners

Returns:
true if finished, false otherwise