org.apache.droids.impl
Class SequentialTaskMaster<T extends Task>

java.lang.Object
  extended by org.apache.droids.helper.Loggable
      extended by org.apache.droids.impl.SequentialTaskMaster<T>
All Implemented Interfaces:
TaskMaster<T>

public class SequentialTaskMaster<T extends Task>
extends Loggable
implements TaskMaster<T>


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.droids.api.TaskMaster
TaskMaster.ExecutionState
 
Field Summary
 
Fields inherited from class org.apache.droids.helper.Loggable
log
 
Constructor Summary
SequentialTaskMaster()
           
 
Method Summary
 void awaitTermination(long timeout, java.util.concurrent.TimeUnit unit)
           
 long getCompletedTasks()
           
 TaskMaster.ExecutionState getExecutionState()
           
 java.util.Date getFinishedWorking()
           
 T getLastCompletedTask()
           
 java.util.Date getStartTime()
           
 boolean isWorking()
           
 void processAllTasks(TaskQueue<T> queue, Droid<T> droid)
          The queue has been initialized
 void setDelayTimer(DelayTimer delayTimer)
           
 void setExceptionHandler(TaskExceptionHandler exHandler)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SequentialTaskMaster

public SequentialTaskMaster()
Method Detail

processAllTasks

public void processAllTasks(TaskQueue<T> queue,
                            Droid<T> droid)
The queue has been initialized

Specified by:
processAllTasks in interface TaskMaster<T extends Task>

setExceptionHandler

public final void setExceptionHandler(TaskExceptionHandler exHandler)

setDelayTimer

public final void setDelayTimer(DelayTimer delayTimer)

isWorking

public boolean isWorking()

getStartTime

public java.util.Date getStartTime()
Specified by:
getStartTime in interface TaskMaster<T extends Task>

getFinishedWorking

public java.util.Date getFinishedWorking()
Specified by:
getFinishedWorking in interface TaskMaster<T extends Task>

getCompletedTasks

public long getCompletedTasks()
Specified by:
getCompletedTasks in interface TaskMaster<T extends Task>

getLastCompletedTask

public T getLastCompletedTask()
Specified by:
getLastCompletedTask in interface TaskMaster<T extends Task>

awaitTermination

public void awaitTermination(long timeout,
                             java.util.concurrent.TimeUnit unit)
                      throws java.lang.InterruptedException
Specified by:
awaitTermination in interface TaskMaster<T extends Task>
Throws:
java.lang.InterruptedException

getExecutionState

public TaskMaster.ExecutionState getExecutionState()
Specified by:
getExecutionState in interface TaskMaster<T extends Task>


Copyright © 2007-2009. All Rights Reserved.