Package 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CommandLauncher.DescriptorImpl
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
-
Fields inherited from class hudson.slaves.ComputerLauncher
LIST
-
-
Constructor Summary
Constructors Constructor Description CommandLauncher(String command)
Constructor for use from UI.CommandLauncher(String command, EnvVars env)
Constructor for programmatic use.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCommand()
void
launch(SlaveComputer computer, TaskListener listener)
-
Methods inherited from class hudson.slaves.ComputerLauncher
afterDisconnect, afterDisconnect, beforeDisconnect, beforeDisconnect, checkJavaVersion, isLaunchSupported, launch
-
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
-
-
-
Constructor Detail
-
CommandLauncher
@DataBoundConstructor public CommandLauncher(String command)
Constructor for use from UI. Conditionally approves the script.- Parameters:
command
- the command to run pending approval- See Also:
CommandLauncher(String command, EnvVars env)
-
CommandLauncher
public CommandLauncher(String command, EnvVars env)
Constructor for programmatic use. Always approves the script.- Parameters:
command
- the single command to run; note: this can't be a shell statement (e.g. "echo foo > bar; baz" -- if you need to do that, either use "sh -c" or write the expression into a script and point to the script)env
- environment variables for the launcher to include when it runs the command
-
-
Method Detail
-
getCommand
public String getCommand()
-
launch
public void launch(SlaveComputer computer, TaskListener listener)
- Overrides:
launch
in classComputerLauncher
-
-