hudson.model
Class Queue.QueueDecisionHandler

java.lang.Object
  extended by hudson.model.Queue.QueueDecisionHandler
All Implemented Interfaces:
ExtensionPoint
Enclosing class:
Queue

public abstract static class Queue.QueueDecisionHandler
extends Object
implements ExtensionPoint

Extension point for deciding if particular job should be scheduled or not.

This handler is consulted every time someone tries to submit a task to the queue. If any of the registered handlers returns false, the task will not be added to the queue, and the task will never get executed.

The other use case is to add additional Actions to the task (for example LabelAssignmentAction) to tasks that are submitted to the queue.

Since:
1.316

Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Constructor Summary
Queue.QueueDecisionHandler()
           
 
Method Summary
static ExtensionList<Queue.QueueDecisionHandler> all()
          All registered Queue.QueueDecisionHandlers
abstract  boolean shouldSchedule(Queue.Task p, List<Action> actions)
          Returns whether the new item should be scheduled.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Queue.QueueDecisionHandler

public Queue.QueueDecisionHandler()
Method Detail

shouldSchedule

public abstract boolean shouldSchedule(Queue.Task p,
                                       List<Action> actions)
Returns whether the new item should be scheduled.

Parameters:
actions - List of actions that are to be made available as Actionable.getActions() upon the start of the build. This list is live, and can be mutated.

all

public static ExtensionList<Queue.QueueDecisionHandler> all()
All registered Queue.QueueDecisionHandlers

Returns:


Copyright © 2004-2013. All Rights Reserved.