IMPACT
Class ConTestTask

java.lang.Object
  extended by javax.swing.SwingWorker<java.lang.String,java.lang.Void>
      extended by IMPACT.ConTestTask
All Implemented Interfaces:
java.lang.Runnable, java.util.concurrent.Future<java.lang.String>, java.util.concurrent.RunnableFuture<java.lang.String>

public class ConTestTask
extends javax.swing.SwingWorker<java.lang.String,java.lang.Void>

Implementation of background task for ConTest execution.

Author:
Emanuel Maldonado

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.SwingWorker
javax.swing.SwingWorker.StateValue
 
Method Summary
protected  java.lang.String doInBackground()
           
protected  void done()
           
 int getCurrent()
          Get current value for display progress bar and/or monitor.
 java.lang.String getMessage(int fstsndall)
          Get message that shows task status.
 java.lang.String getOutput()
          Get output from terminated execution.
 boolean gotError()
          Verify if task terminated with error.
 boolean isdone()
          Verify if task has terminated.
 void stop()
          Stop ConTest execution.
 
Methods inherited from class javax.swing.SwingWorker
addPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, process, publish, removePropertyChangeListener, run, setProgress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

doInBackground

protected java.lang.String doInBackground()
Specified by:
doInBackground in class javax.swing.SwingWorker<java.lang.String,java.lang.Void>

done

protected void done()
Overrides:
done in class javax.swing.SwingWorker<java.lang.String,java.lang.Void>

isdone

public boolean isdone()
Verify if task has terminated. Updates current time. Calculates current status of task.

Returns:
true if task ended; false otherwise still running.
See Also:
getCurrTimeM(), getCurrent()

gotError

public boolean gotError()
Verify if task terminated with error.

Returns:
true if there was an error; false otherwise.

getOutput

public java.lang.String getOutput()
Get output from terminated execution.

Returns:
program output; null while execution not terminated.

getCurrent

public int getCurrent()
Get current value for display progress bar and/or monitor.

Returns:
display value.

getMessage

public java.lang.String getMessage(int fstsndall)
Get message that shows task status.

Parameters:
fstsndall - indication of what message to get. With value 1 gets Completed Task message with value 2 gets Elapsed Time message A diferent value gets both previous messages, where the second follows the first.
Returns:
message status

stop

public void stop()
Stop ConTest execution.