Class ToolInstaller

  extended by
All Implemented Interfaces:
ExtensionPoint, Describable<ToolInstaller>
Direct Known Subclasses:
CommandInstaller, DownloadFromUrlInstaller, JDKInstaller, ZipExtractionInstaller

public abstract class ToolInstaller
extends Object
implements Describable<ToolInstaller>, ExtensionPoint

An object which can ensure that a generic ToolInstallation in fact exists on a node. The subclass should have a ToolInstallerDescriptor. A config.jelly should be provided to customize specific fields; <t:label xmlns:t="/hudson/tools"/> to customize label.

See Also:
Tool Auto-Installation

Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
Method Summary
 boolean appliesTo(Node node)
          Checks whether this installer can be applied to a given node.
 ToolInstallerDescriptor<?> getDescriptor()
          Gets the descriptor for this instance.
 String getLabel()
          Label to limit which nodes this installation can be performed on.
abstract  FilePath performInstallation(ToolInstallation tool, Node node, TaskListener log)
          Ensure that the configured tool is really installed.
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail


public final String getLabel()
Label to limit which nodes this installation can be performed on. Can be null to not impose a limit.


public boolean appliesTo(Node node)
Checks whether this installer can be applied to a given node. (By default, just checks the label.)


public abstract FilePath performInstallation(ToolInstallation tool,
                                             Node node,
                                             TaskListener log)
                                      throws IOException,
Ensure that the configured tool is really installed. If it is already installed, do nothing. Called only if appliesTo(Node) are true.

tool - the tool being installed
node - the computer on which to install the tool
log - any status messages produced by the installation go here
the (directory) path at which the tool can be found, typically coming from preferredLocation(, hudson.model.Node)
IOException - if installation fails
InterruptedException - if communication with a slave is interrupted


public ToolInstallerDescriptor<?> 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<ToolInstaller>

Copyright © 2004-2013 Hudson. All Rights Reserved.