es.unex.sextante.core
Class ProcessTask

java.lang.Object
  extended by es.unex.sextante.core.ProcessTask
All Implemented Interfaces:
IMonitorableTask, java.util.concurrent.Callable<java.lang.Boolean>

public class ProcessTask
extends java.lang.Object
implements IMonitorableTask, java.util.concurrent.Callable<java.lang.Boolean>

This task processes a geoalgorithm

Author:
Victor Olaya volaya@unex.es

Constructor Summary
ProcessTask(GeoAlgorithm algorithm, OutputFactory outputFactory, ITaskMonitor taskMonitor)
          Creates a new process task
 
Method Summary
 java.lang.Boolean call()
          Starts the execution of the task
 boolean isCanceled()
          Returns true if the task has been canceled
 boolean isFinished()
          Returns true if the task has been finished
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessTask

public ProcessTask(GeoAlgorithm algorithm,
                   OutputFactory outputFactory,
                   ITaskMonitor taskMonitor)
Creates a new process task

Parameters:
algorithm - the algorithm to process
outputFactory - the output factory to use for executing the algorithm
taskMonitor - the task monitor to use for monitoring algorithm execution
Method Detail

call

public java.lang.Boolean call()
                       throws GeoAlgorithmExecutionException
Starts the execution of the task

Specified by:
call in interface java.util.concurrent.Callable<java.lang.Boolean>
Returns:
true if the algorithm was executed completely, false if it was canceled
Throws:
GeoAlgorithmExecutionException - if there were problems during algorithm execution

isCanceled

public boolean isCanceled()
Returns true if the task has been canceled

Specified by:
isCanceled in interface IMonitorableTask
Returns:
true if the algorithm has been canceled

isFinished

public boolean isFinished()
Returns true if the task has been finished

Specified by:
isFinished in interface IMonitorableTask
Returns:
true if the algorithm has been finished