提交 ce2614e1 编写于 作者: K kohsuke

Renaming to reflect what it really does.



git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@9409 71c3de6d-444a-0410-be80-ed276b4c234a
上级 efcfe5d1
......@@ -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<Descriptor<SlaveStartMethod>> getSlaveStartMethodDescriptors() {
return SlaveStartMethod.LIST;
public static List<Descriptor<ComputerStartMethod>> getSlaveStartMethodDescriptors() {
return ComputerStartMethod.LIST;
}
public static List<Descriptor<RetentionStrategy<?>>> getSlaveAvailabilityStrategyDescriptors() {
......
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
......
......@@ -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<TopLevelItem>, 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);
......
......@@ -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);
// }
}
......@@ -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<SlaveStartMethod> getDescriptor() {
public Descriptor<ComputerStartMethod> getDescriptor() {
return DESCRIPTOR;
}
public static final Descriptor<SlaveStartMethod> DESCRIPTOR = new Descriptor<SlaveStartMethod>(CommandStartMethod.class) {
public static final Descriptor<ComputerStartMethod> DESCRIPTOR = new Descriptor<ComputerStartMethod>(CommandStartMethod.class) {
public String getDisplayName() {
return "Launch slave via execution of command on the Master";
}
......
......@@ -20,9 +20,9 @@ import java.io.OutputStream;
* @author Stephen Connolly
* @since 24-Apr-2008 22:12:35
*/
public abstract class SlaveStartMethod implements Describable<SlaveStartMethod>, ExtensionPoint {
public abstract class ComputerStartMethod implements Describable<ComputerStartMethod>, 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<SlaveStartMethod>,
public abstract void launch(SlaveComputer computer, StreamTaskListener listener);
/**
* All registered {@link SlaveStartMethod} implementations.
* All registered {@link ComputerStartMethod} implementations.
*/
public static final DescriptorList<SlaveStartMethod> LIST = new DescriptorList<SlaveStartMethod>(
public static final DescriptorList<ComputerStartMethod> LIST = new DescriptorList<ComputerStartMethod>(
JNLPStartMethod.DESCRIPTOR,
CommandStartMethod.DESCRIPTOR
);
......
......@@ -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<SlaveStartMethod> getDescriptor() {
public Descriptor<ComputerStartMethod> getDescriptor() {
return DESCRIPTOR;
}
public static final Descriptor<SlaveStartMethod> DESCRIPTOR = new Descriptor<SlaveStartMethod>(JNLPStartMethod.class) {
public static final Descriptor<ComputerStartMethod> DESCRIPTOR = new Descriptor<ComputerStartMethod>(JNLPStartMethod.class) {
public String getDisplayName() {
return "Launch slave agents via JNLP";
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册