diff --git a/core/src/main/java/hudson/Functions.java b/core/src/main/java/hudson/Functions.java index 9c9bef72a3..c7fbd4aed8 100644 --- a/core/src/main/java/hudson/Functions.java +++ b/core/src/main/java/hudson/Functions.java @@ -13,7 +13,7 @@ import hudson.security.SecurityRealm; import hudson.security.AuthorizationStrategy; import hudson.security.Permission; import hudson.util.Area; -import hudson.slaves.SlaveStartMethod; +import hudson.slaves.ComputerStartMethod; import hudson.slaves.RetentionStrategy; import org.apache.commons.jexl.parser.ASTSizeFunction; import org.apache.commons.jexl.util.Introspector; @@ -494,8 +494,8 @@ public class Functions { return BuildStepDescriptor.filter(BuildStep.PUBLISHERS, project.getClass()); } - public static List> getSlaveStartMethodDescriptors() { - return SlaveStartMethod.LIST; + public static List> getSlaveStartMethodDescriptors() { + return ComputerStartMethod.LIST; } public static List>> getSlaveAvailabilityStrategyDescriptors() { diff --git a/core/src/main/java/hudson/model/Computer.java b/core/src/main/java/hudson/model/Computer.java index 040a02d601..d295a90cc6 100644 --- a/core/src/main/java/hudson/model/Computer.java +++ b/core/src/main/java/hudson/model/Computer.java @@ -1,7 +1,7 @@ package hudson.model; import hudson.EnvVars; -import hudson.slaves.SlaveStartMethod; +import hudson.slaves.ComputerStartMethod; import hudson.slaves.RetentionStrategy; import hudson.node_monitors.NodeMonitor; import hudson.remoting.Channel; @@ -127,7 +127,7 @@ public abstract class Computer extends AbstractModelObject { /** * Returns true if this computer is supposed to be launched via JNLP. - * @deprecated see {@linkplain #isLaunchSupported()} and {@linkplain SlaveStartMethod} + * @deprecated see {@linkplain #isLaunchSupported()} and {@linkplain ComputerStartMethod} */ @Exported @Deprecated diff --git a/core/src/main/java/hudson/model/Hudson.java b/core/src/main/java/hudson/model/Hudson.java index e6695e524e..4b3880f689 100644 --- a/core/src/main/java/hudson/model/Hudson.java +++ b/core/src/main/java/hudson/model/Hudson.java @@ -14,7 +14,7 @@ import hudson.TcpSlaveAgentListener; import hudson.Util; import static hudson.Util.fixEmpty; import hudson.XmlFile; -import hudson.slaves.SlaveStartMethod; +import hudson.slaves.ComputerStartMethod; import hudson.slaves.RetentionStrategy; import hudson.model.Descriptor.FormException; import hudson.model.listeners.ItemListener; @@ -1523,7 +1523,7 @@ public final class Hudson extends View implements ItemGroup, Node, } private Slave newSlave(StaplerRequest req, JSONObject j) throws FormException { - final SlaveStartMethod startMethod = newDescribedChild(req, j, "startMethod", SlaveStartMethod.LIST); + final ComputerStartMethod startMethod = newDescribedChild(req, j, "startMethod", ComputerStartMethod.LIST); final RetentionStrategy availabilityStrategy = newDescribedChild(req, j, "availabilityStrategy", RetentionStrategy.LIST); final Slave slave = req.bindJSON(Slave.class, j); diff --git a/core/src/main/java/hudson/model/Slave.java b/core/src/main/java/hudson/model/Slave.java index 2177967771..073b0ba895 100644 --- a/core/src/main/java/hudson/model/Slave.java +++ b/core/src/main/java/hudson/model/Slave.java @@ -4,7 +4,7 @@ import hudson.FilePath; import hudson.Launcher; import hudson.Launcher.RemoteLauncher; import hudson.Util; -import hudson.slaves.SlaveStartMethod; +import hudson.slaves.ComputerStartMethod; import hudson.slaves.RetentionStrategy; import hudson.slaves.CommandStartMethod; import hudson.slaves.JNLPStartMethod; @@ -71,7 +71,7 @@ public final class Slave implements Node, Serializable { /** * The starter that will startup this slave. */ - private SlaveStartMethod startMethod; + private ComputerStartMethod startMethod; /** * Whitespace-separated labels. @@ -114,11 +114,11 @@ public final class Slave implements Node, Serializable { throw new FormException(Messages.Slave_InvalidConfig_Executors(name), null); } - public SlaveStartMethod getStartMethod() { + public ComputerStartMethod getStartMethod() { return startMethod == null ? new JNLPStartMethod() : startMethod; } - public void setStartMethod(SlaveStartMethod startMethod) { + public void setStartMethod(ComputerStartMethod startMethod) { this.startMethod = startMethod; } @@ -384,6 +384,6 @@ public final class Slave implements Node, Serializable { // } // return null; //To change body of implemented methods use File | Settings | File Templates. // } -// }, SlaveStartMethod.class); +// }, ComputerStartMethod.class); // } } diff --git a/core/src/main/java/hudson/slaves/CommandStartMethod.java b/core/src/main/java/hudson/slaves/CommandStartMethod.java index 137c087045..7d123f0b3c 100644 --- a/core/src/main/java/hudson/slaves/CommandStartMethod.java +++ b/core/src/main/java/hudson/slaves/CommandStartMethod.java @@ -16,12 +16,12 @@ import java.util.logging.Logger; import java.io.IOException; /** - * {@link SlaveStartMethod} through a remote login mechanism like ssh/rsh. + * {@link ComputerStartMethod} through a remote login mechanism like ssh/rsh. * * @author Stephen Connolly * @author Kohsuke Kawaguchi */ -public class CommandStartMethod extends SlaveStartMethod { +public class CommandStartMethod extends ComputerStartMethod { /** * Command line to launch the agent, like @@ -38,11 +38,11 @@ public class CommandStartMethod extends SlaveStartMethod { return agentCommand; } - public Descriptor getDescriptor() { + public Descriptor getDescriptor() { return DESCRIPTOR; } - public static final Descriptor DESCRIPTOR = new Descriptor(CommandStartMethod.class) { + public static final Descriptor DESCRIPTOR = new Descriptor(CommandStartMethod.class) { public String getDisplayName() { return "Launch slave via execution of command on the Master"; } diff --git a/core/src/main/java/hudson/slaves/SlaveStartMethod.java b/core/src/main/java/hudson/slaves/ComputerStartMethod.java similarity index 79% rename from core/src/main/java/hudson/slaves/SlaveStartMethod.java rename to core/src/main/java/hudson/slaves/ComputerStartMethod.java index cf28a7c5d8..7550c13e84 100644 --- a/core/src/main/java/hudson/slaves/SlaveStartMethod.java +++ b/core/src/main/java/hudson/slaves/ComputerStartMethod.java @@ -20,9 +20,9 @@ import java.io.OutputStream; * @author Stephen Connolly * @since 24-Apr-2008 22:12:35 */ -public abstract class SlaveStartMethod implements Describable, ExtensionPoint { +public abstract class ComputerStartMethod implements Describable, ExtensionPoint { /** - * Returns true if this {@link SlaveStartMethod} supports + * Returns true if this {@link ComputerStartMethod} supports * programatic launch of the slave agent in the target {@link Computer}. */ public boolean isLaunchSupported() { @@ -44,9 +44,9 @@ public abstract class SlaveStartMethod implements Describable, public abstract void launch(SlaveComputer computer, StreamTaskListener listener); /** - * All registered {@link SlaveStartMethod} implementations. + * All registered {@link ComputerStartMethod} implementations. */ - public static final DescriptorList LIST = new DescriptorList( + public static final DescriptorList LIST = new DescriptorList( JNLPStartMethod.DESCRIPTOR, CommandStartMethod.DESCRIPTOR ); diff --git a/core/src/main/java/hudson/slaves/JNLPStartMethod.java b/core/src/main/java/hudson/slaves/JNLPStartMethod.java index 7cddb0137f..5f4e112f76 100644 --- a/core/src/main/java/hudson/slaves/JNLPStartMethod.java +++ b/core/src/main/java/hudson/slaves/JNLPStartMethod.java @@ -5,12 +5,12 @@ import hudson.util.StreamTaskListener; import org.kohsuke.stapler.DataBoundConstructor; /** - * {@link SlaveStartMethod} via JNLP. + * {@link ComputerStartMethod} via JNLP. * * @author Stephen Connolly * @author Kohsuke Kawaguchi */ -public class JNLPStartMethod extends SlaveStartMethod { +public class JNLPStartMethod extends ComputerStartMethod { @DataBoundConstructor public JNLPStartMethod() { } @@ -24,11 +24,11 @@ public class JNLPStartMethod extends SlaveStartMethod { // do nothing as we cannot self start } - public Descriptor getDescriptor() { + public Descriptor getDescriptor() { return DESCRIPTOR; } - public static final Descriptor DESCRIPTOR = new Descriptor(JNLPStartMethod.class) { + public static final Descriptor DESCRIPTOR = new Descriptor(JNLPStartMethod.class) { public String getDisplayName() { return "Launch slave agents via JNLP"; }