From 21faaf7a618f20acf0a0b14faa396456a4be1bf1 Mon Sep 17 00:00:00 2001 From: kohsuke Date: Sun, 18 May 2008 17:28:04 +0000 Subject: [PATCH] doc improvement git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@9387 71c3de6d-444a-0410-be80-ed276b4c234a --- .../java/hudson/model/SlaveStartMethod.java | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/core/src/main/java/hudson/model/SlaveStartMethod.java b/core/src/main/java/hudson/model/SlaveStartMethod.java index ff12d4d49c..028ca5b2e1 100644 --- a/core/src/main/java/hudson/model/SlaveStartMethod.java +++ b/core/src/main/java/hudson/model/SlaveStartMethod.java @@ -1,17 +1,14 @@ package hudson.model; import hudson.ExtensionPoint; -import hudson.security.SecurityRealm; +import hudson.model.Slave.ComputerImpl; +import hudson.remoting.Channel.Listener; import hudson.util.DescriptorList; +import hudson.util.StreamTaskListener; -import java.util.List; -import java.util.ArrayList; -import java.util.logging.Logger; +import java.io.InputStream; import java.io.OutputStream; -import org.apache.commons.beanutils.ConvertUtils; -import org.apache.commons.beanutils.Converter; - /** * Extension point to allow control over how Slaves are started. * @@ -27,7 +24,19 @@ public abstract class SlaveStartMethod implements Describable, return true; } - public abstract void launch(Slave.ComputerImpl computer, OutputStream launchLog); + /** + * Launches the slave agent for the given {@link Computer}. + * + *

+ * If the slave agent is launched successfully, {@link ComputerImpl#setChannel(InputStream, OutputStream, OutputStream, Listener)} + * should be invoked in the end to notify Hudson of the established connection. + * The operation could also fail, in which case there's no need to make any callback notification, + * (except to notify the user of the failure through {@link StreamTaskListener}.) + * + * @param listener + * The progress of the launch, as well as any error, should be sent to this listener. + */ + public abstract void launch(Slave.ComputerImpl computer, StreamTaskListener listener); /** * All registered {@link SlaveStartMethod} implementations.