net.sourceforge.cruisecontrol
Class BuildQueue

java.lang.Object
  extended bynet.sourceforge.cruisecontrol.BuildQueue
All Implemented Interfaces:
java.lang.Runnable

public class BuildQueue
extends java.lang.Object
implements java.lang.Runnable

Provides an independent thread of execution that knows how to build Projects. Passes ProjectInterface objects to a thread queue. The number of worker threads is defined in config.xml

Author:
Peter Mei , jfredrick, Jared Richardson

Nested Class Summary
static interface BuildQueue.Listener
           
 
Constructor Summary
BuildQueue()
           
 
Method Summary
 void addListener(BuildQueue.Listener listener)
           
 java.lang.String findPosition(ProjectInterface project)
           
 boolean isAlive()
           
 boolean isWaiting()
           
 void requestBuild(ProjectInterface project)
           
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuildQueue

public BuildQueue()
Method Detail

requestBuild

public void requestBuild(ProjectInterface project)
Parameters:
project -

findPosition

public java.lang.String findPosition(ProjectInterface project)
Parameters:
project - The project to find in the queues
Returns:
String representing this project's position in the various queues, e.g. IDLE[ 5 / 24 ]

run

public void run()
Specified by:
run in interface java.lang.Runnable

isAlive

public boolean isAlive()

isWaiting

public boolean isWaiting()

addListener

public void addListener(BuildQueue.Listener listener)