hudson.slaves
Class NodeProperty<N extends Node>

java.lang.Object
  extended by hudson.slaves.NodeProperty<N>
Type Parameters:
N - NodeProperty can choose to only work with a certain subtype of Node, and this 'N' represents that type. Also see PropertyDescriptor.isApplicable(Class).
All Implemented Interfaces:
ExtensionPoint, Describable<NodeProperty<?>>
Direct Known Subclasses:
EnvironmentVariablesNodeProperty, ToolLocationNodeProperty

public abstract class NodeProperty<N extends Node>
extends Object
implements Describable<NodeProperty<?>>, ExtensionPoint

Extensible property of Node.

Plugins can contribute this extension point to add additional data or UI actions to Node. NodePropertys show up in the configuration screen of a node, and they are persisted with the Node object.

Views

config.jelly
Added to the configuration page of the node.
global.jelly
Added to the system configuration page.
summary.jelly (optional)
Added to the index page of the Computer associated with the node

Since:
1.286

Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Constructor Summary
NodeProperty()
           
 
Method Summary
static DescriptorExtensionList<NodeProperty<?>,NodePropertyDescriptor> all()
          Lists up all the registered NodeDescriptors in the system.
 CauseOfBlockage canTake(Queue.Task task)
          Called by the Node to help determine whether or not it should take the given task.
static List<NodePropertyDescriptor> for_(Node node)
          List up all NodePropertyDescriptors that are applicable for the given project.
 NodePropertyDescriptor getDescriptor()
          Gets the descriptor for this instance.
 Environment setUp(AbstractBuild build, Launcher launcher, BuildListener listener)
          Runs before the SCM.checkout(AbstractBuild, Launcher, FilePath, BuildListener, File) runs, and performs a set up.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeProperty

public NodeProperty()
Method Detail

getDescriptor

public NodePropertyDescriptor getDescriptor()
Description copied from interface: Describable
Gets the descriptor for this instance.

Descriptor is a singleton for every concrete Describable implementation, so if a.getClass()==b.getClass() then a.getDescriptor()==b.getDescriptor() must hold.

Specified by:
getDescriptor in interface Describable<NodeProperty<?>>

canTake

public CauseOfBlockage canTake(Queue.Task task)
Called by the Node to help determine whether or not it should take the given task. Individual properties can return a non-null value here if there is some reason the given task should not be run on its associated node. By default, this method returns null.

Since:
1.360

setUp

public Environment setUp(AbstractBuild build,
                         Launcher launcher,
                         BuildListener listener)
                  throws IOException,
                         InterruptedException
Runs before the SCM.checkout(AbstractBuild, Launcher, FilePath, BuildListener, File) runs, and performs a set up. Can contribute additional properties to the environment.

Parameters:
build - The build in progress for which an Environment object is created. Never null.
launcher - This launcher can be used to launch processes for this build. If the build runs remotely, launcher will also run a job on that remote machine. Never null.
listener - Can be used to send any message.
Returns:
non-null if the build can continue, null if there was an error and the build needs to be aborted.
Throws:
IOException - terminates the build abnormally. Hudson will handle the exception and reports a nice error message.
InterruptedException

all

public static DescriptorExtensionList<NodeProperty<?>,NodePropertyDescriptor> all()
Lists up all the registered NodeDescriptors in the system.


for_

public static List<NodePropertyDescriptor> for_(Node node)
List up all NodePropertyDescriptors that are applicable for the given project.



Copyright © 2004-2013 Hudson. All Rights Reserved.