public class CommandLauncher extends ComputerLauncher
ComputerLauncher
through a remote login mechanism like ssh/rsh.Modifier and Type | Class and Description |
---|---|
static class |
CommandLauncher.DescriptorImpl |
ExtensionPoint.LegacyInstancesAreScopedToHudson
LIST
Constructor and Description |
---|
CommandLauncher(String command) |
CommandLauncher(String command,
EnvVars env) |
Modifier and Type | Method and Description |
---|---|
String |
getCommand() |
void |
launch(SlaveComputer computer,
TaskListener listener)
Launches the slave agent for the given
Computer . |
afterDisconnect, afterDisconnect, beforeDisconnect, beforeDisconnect, checkJavaVersion, isLaunchSupported, launch
getDescriptor
@DataBoundConstructor public CommandLauncher(String command)
public String getCommand()
public void launch(SlaveComputer computer, TaskListener listener)
ComputerLauncher
Computer
.
If the slave agent is launched successfully, SlaveComputer.setChannel(InputStream, OutputStream, TaskListener, Channel.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 StreamTaskListener
.)
Also note that the normal return of this method call does not necessarily signify a successful launch.
If someone programmatically calls this method and wants to find out if the launch was a success,
use Computer.isOnline()
at the end.
This method must operate synchronously. Asynchrony is provided by Computer.connect(boolean)
and
its correct operation depends on this.
launch
in class ComputerLauncher
listener
- The progress of the launch, as well as any error, should be sent to this listener.Copyright © 2017. All rights reserved.