de.intarsys.tools.concurrent
Class TaskSequence<R>

java.lang.Object
  extended by de.intarsys.tools.concurrent.AbstractFutureTask<R>
      extended by de.intarsys.tools.concurrent.TaskSequence<R>
All Implemented Interfaces:
java.lang.Runnable, java.util.concurrent.Future

public class TaskSequence<R>
extends AbstractFutureTask<R>

experimental


Field Summary
 
Fields inherited from class de.intarsys.tools.concurrent.AbstractFutureTask
Log
 
Constructor Summary
TaskSequence(java.lang.String labelPrefix)
           
 
Method Summary
 void addTask(java.lang.Runnable task, int percent)
           
protected  R compute()
           
protected  java.lang.String getLabelPrefix()
           
protected  java.lang.String getLabelSuffix()
           
 void setLabelPrefix(java.lang.String labelPrefix)
           
 
Methods inherited from class de.intarsys.tools.concurrent.AbstractFutureTask
basicGetException, basicGetResult, cancel, computeAsync, get, get, getException, handleException, handleFinally, handleResult, isActive, isCancelled, isDone, isFailed, reset, run, runAsync, setException, setResult, taskCancelled, taskFailed, taskFinally, taskFinished, taskStarted, toString, undo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TaskSequence

public TaskSequence(java.lang.String labelPrefix)
Method Detail

addTask

public void addTask(java.lang.Runnable task,
                    int percent)

compute

protected R compute()
             throws java.lang.Exception
Specified by:
compute in class AbstractFutureTask<R>
Throws:
java.lang.Exception

getLabelPrefix

protected java.lang.String getLabelPrefix()

getLabelSuffix

protected java.lang.String getLabelSuffix()

setLabelPrefix

public void setLabelPrefix(java.lang.String labelPrefix)