package hudson.model; import hudson.FilePath; import hudson.Launcher; import hudson.Launcher.RemoteLauncher; import hudson.Util; import hudson.slaves.ComputerStartMethod; import hudson.slaves.RetentionStrategy; import hudson.slaves.CommandStartMethod; import hudson.slaves.JNLPStartMethod; import hudson.slaves.SlaveComputer; import hudson.model.Descriptor.FormException; import hudson.remoting.Callable; import hudson.remoting.VirtualChannel; import hudson.tasks.DynamicLabeler; import hudson.tasks.LabelFinder; import hudson.util.ClockDifference; import org.kohsuke.stapler.StaplerRequest; import org.kohsuke.stapler.StaplerResponse; import javax.servlet.ServletException; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.Serializable; import java.net.URL; import java.net.URLConnection; import java.util.*; /** * Information about a Hudson slave node. * *

* Ideally this would have been in the hudson.slaves package, * but for compatibility reasons, it can't. * * @author Kohsuke Kawaguchi */ public final class Slave implements Node, Serializable { /** * Name of this slave node. */ protected final String name; /** * Description of this node. */ private final String description; /** * Path to the root of the workspace * from the view point of this node, such as "/hudson" */ protected final String remoteFS; /** * Number of executors of this node. */ private int numExecutors = 2; /** * Job allocation strategy. */ private Mode mode; /** * Slave availablility strategy. */ private RetentionStrategy availabilityStrategy; /** * The starter that will startup this slave. */ private ComputerStartMethod startMethod; /** * Whitespace-separated labels. */ private String label=""; /** * Lazily computed set of labels from {@link #label}. */ private transient volatile Set