From d5752b8a41333560a84770e4e75fcefebce8e0b7 Mon Sep 17 00:00:00 2001 From: kohsuke Date: Sun, 18 May 2008 17:17:54 +0000 Subject: [PATCH] The term used in Hudson for this is 'launch', not 'start', so making it consistent. git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@9386 71c3de6d-444a-0410-be80-ed276b4c234a --- core/src/main/java/hudson/model/Computer.java | 4 ++-- core/src/main/java/hudson/model/ComputerSet.java | 3 +-- core/src/main/java/hudson/model/Slave.java | 6 +++--- .../main/java/hudson/model/SlaveAvailabilityStrategy.java | 2 +- core/src/main/java/hudson/model/SlaveStartMethod.java | 7 +++++-- 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/core/src/main/java/hudson/model/Computer.java b/core/src/main/java/hudson/model/Computer.java index 3933c2e631..ab5fe008c5 100644 --- a/core/src/main/java/hudson/model/Computer.java +++ b/core/src/main/java/hudson/model/Computer.java @@ -125,7 +125,7 @@ public abstract class Computer extends AbstractModelObject { /** * Returns true if this computer is supposed to be launched via JNLP. - * @deprecated see {@linkplain #isStartSupported()} and {@linkplain hudson.model.SlaveStartMethod} + * @deprecated see {@linkplain #isLaunchSupported()} and {@linkplain hudson.model.SlaveStartMethod} */ @Exported @Deprecated @@ -137,7 +137,7 @@ public abstract class Computer extends AbstractModelObject { * Returns true if this computer can be launched by Hudson. */ @Exported - public boolean isStartSupported() { + public boolean isLaunchSupported() { return true; } diff --git a/core/src/main/java/hudson/model/ComputerSet.java b/core/src/main/java/hudson/model/ComputerSet.java index 796f5374a8..1d9f631b92 100644 --- a/core/src/main/java/hudson/model/ComputerSet.java +++ b/core/src/main/java/hudson/model/ComputerSet.java @@ -6,7 +6,6 @@ import org.kohsuke.stapler.StaplerRequest; import org.kohsuke.stapler.StaplerResponse; import java.util.ArrayList; -import java.util.Collections; import java.util.List; import java.io.IOException; import org.kohsuke.stapler.export.ExportedBean; @@ -43,7 +42,7 @@ public final class ComputerSet implements ModelObject { public void do_launchAll(StaplerRequest req, StaplerResponse rsp) throws IOException { for(Computer c : get_all()) { - if(c.isStartSupported()) + if(c.isLaunchSupported()) continue; c.launch(); } diff --git a/core/src/main/java/hudson/model/Slave.java b/core/src/main/java/hudson/model/Slave.java index d20048d0b9..6a43a645c2 100644 --- a/core/src/main/java/hudson/model/Slave.java +++ b/core/src/main/java/hudson/model/Slave.java @@ -322,8 +322,8 @@ public final class Slave implements Node, Serializable { } @Override - public boolean isStartSupported() { - return getNode().getStartMethod().isStartSupported(); + public boolean isLaunchSupported() { + return getNode().getStartMethod().isLaunchSupported(); } /** @@ -587,7 +587,7 @@ public final class Slave implements Node, Serializable { public static class JNLPStartMethod extends SlaveStartMethod { @Override - public boolean isStartSupported() { + public boolean isLaunchSupported() { return false; } diff --git a/core/src/main/java/hudson/model/SlaveAvailabilityStrategy.java b/core/src/main/java/hudson/model/SlaveAvailabilityStrategy.java index 9d3990994f..cd016e4e8c 100644 --- a/core/src/main/java/hudson/model/SlaveAvailabilityStrategy.java +++ b/core/src/main/java/hudson/model/SlaveAvailabilityStrategy.java @@ -21,7 +21,7 @@ public abstract class SlaveAvailabilityStrategy implements Describable, ExtensionPoint { - - public boolean isStartSupported() { + /** + * Returns true if this {@link SlaveStartMethod} supports + * programatic launch of the slave agent in the target {@link Computer}. + */ + public boolean isLaunchSupported() { return true; }