Trull

edu.luc.cs.trull.task
Class QueuedTaskWorker

java.lang.Object
  extended by edu.luc.cs.trull.EmptyComponent
      extended by edu.luc.cs.trull.TerminatingComponent
          extended by edu.luc.cs.trull.task.AbstractTaskWorker
              extended by edu.luc.cs.trull.task.QueuedTaskWorker
All Implemented Interfaces:
Component, PropertyChangeSource, Startable, Suspendable, Terminating, java.beans.PropertyChangeListener, java.util.EventListener

public class QueuedTaskWorker
extends AbstractTaskWorker

A Worker that uses a single-threaded QueuedExecutor to perform its Task.

See Also:
Task

Field Summary
private static EDU.oswego.cs.dl.util.concurrent.Executor executor
           
private static org.apache.log4j.Logger logger
           
protected  java.lang.Runnable repeat
          A Runnable that executes one step of the task and reschedules itself for execution as long as the worker has not been suspended.
 
Fields inherited from class edu.luc.cs.trull.task.AbstractTaskWorker
firstTime, RUNNING, start, state, STOPPED, SUSPENDED, task
 
Constructor Summary
QueuedTaskWorker(Task task)
           
 
Method Summary
protected  EDU.oswego.cs.dl.util.concurrent.Executor getExecutor()
          The executor used by this worker to schedule portions of the work.
 void resume()
          Resumes this suspendable component.
 
Methods inherited from class edu.luc.cs.trull.task.AbstractTaskWorker
setStart, setTask, start, stop, suspend
 
Methods inherited from class edu.luc.cs.trull.TerminatingComponent
fireTermination, getParent, getTermEvent, scheduleTermination, setTerminationListener
 
Methods inherited from class edu.luc.cs.trull.EmptyComponent
addPropertyChangeListener, getPropertyChangeListeners, getTerminationListener, propertyChange, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

executor

private static final EDU.oswego.cs.dl.util.concurrent.Executor executor

logger

private static org.apache.log4j.Logger logger

repeat

protected final java.lang.Runnable repeat
A Runnable that executes one step of the task and reschedules itself for execution as long as the worker has not been suspended.

Constructor Detail

QueuedTaskWorker

public QueuedTaskWorker(Task task)
Method Detail

getExecutor

protected final EDU.oswego.cs.dl.util.concurrent.Executor getExecutor()
Description copied from class: AbstractTaskWorker
The executor used by this worker to schedule portions of the work.

Specified by:
getExecutor in class AbstractTaskWorker
Returns:
the executor used by this worker.

resume

public void resume()
Description copied from interface: Suspendable
Resumes this suspendable component.

Specified by:
resume in interface Suspendable
Overrides:
resume in class AbstractTaskWorker

Trull

http://www.cs.luc.edu/trull/