Class PhonTask

java.lang.Object
ca.phon.worker.PhonTask
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
AbstractPluginEntryPoint, AutoValidateTask, PhonTalkTask, ProjectArchiveTask, QueryTask, SessionMerger, VLCMediaExporter

public abstract class PhonTask extends Object implements Runnable
  • Field Details

    • PROGRESS_PROP

      public static final String PROGRESS_PROP
      Task progress property Float Percentage done [0.0-1.0] or invalid input: '<' 0 if inderterminate
      See Also:
    • STATUS_PROP

      public static final String STATUS_PROP
      Task status property. Holds current status test (optional)
      See Also:
    • err

      protected Exception err
      If an exception was caught during the run method, it's stored here
    • props

      protected ConcurrentHashMap<String,Object> props
      Props
  • Constructor Details

    • PhonTask

      public PhonTask()
    • PhonTask

      public PhonTask(String taskName)
  • Method Details

    • getStartTime

      public long getStartTime()
    • getRunTime

      public long getRunTime()
    • run

      public void run()
      Specified by:
      run in interface Runnable
    • performTask

      public abstract void performTask()
      The abstract run method. This method must be implemented by all subclasses.
    • shutdown

      public void shutdown()
    • isShutdown

      public boolean isShutdown()
    • setStatus

      protected void setStatus(PhonTask.TaskStatus s)
    • getStatus

      public PhonTask.TaskStatus getStatus()
    • getName

      public String getName()
    • setName

      public void setName(String name)
    • getException

      public Exception getException()
    • getProperty

      public Object getProperty(String prop)
    • setProperty

      protected void setProperty(String prop, Object val)
    • addTaskListener

      public void addTaskListener(PhonTaskListener l)
    • removeTaskListener

      public void removeTaskListener(PhonTaskListener l)
    • firePropertyChange

      protected void firePropertyChange(String prop, Object oldValue, Object newValue)
    • fireStatusChange

      protected void fireStatusChange(PhonTask.TaskStatus oldStatus, PhonTask.TaskStatus newStatus)