hudson.slaves
Class CommandLauncher
java.lang.Object
hudson.model.AbstractDescribableImpl<ComputerLauncher>
hudson.slaves.ComputerLauncher
hudson.slaves.CommandLauncher
- All Implemented Interfaces:
- ExtensionPoint, Describable<ComputerLauncher>
public class CommandLauncher
- extends ComputerLauncher
ComputerLauncher
through a remote login mechanism like ssh/rsh.
- Author:
- Stephen Connolly, Kohsuke Kawaguchi
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CommandLauncher
@DataBoundConstructor
public CommandLauncher(String command)
CommandLauncher
public CommandLauncher(String command,
EnvVars env)
getCommand
public String getCommand()
launch
public void launch(SlaveComputer computer,
TaskListener listener)
- Description copied from class:
ComputerLauncher
- Launches the slave agent for the given
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.
- Overrides:
launch
in class ComputerLauncher
listener
- The progress of the launch, as well as any error, should be sent to this listener.
Copyright © 2004-2013. All Rights Reserved.