Package hudson
Class Launcher.LocalLauncher
- java.lang.Object
-
- hudson.Launcher
-
- hudson.Launcher.LocalLauncher
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class hudson.Launcher
Launcher.DecoratedLauncher, Launcher.DummyLauncher, Launcher.IOTriplet, Launcher.LocalLauncher, Launcher.ProcStarter, Launcher.RemoteLauncher, Launcher.RemoteProcess
-
-
Field Summary
-
Fields inherited from class hudson.Launcher
channel, envVarsFilterRuleWrapper, listener, showFullPath
-
-
Constructor Summary
Constructors Constructor Description LocalLauncher(TaskListener listener)
LocalLauncher(TaskListener listener, hudson.remoting.VirtualChannel channel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
kill(Map<String,String> modelEnvVars)
CallsProcessTree.killAll(Map)
to kill processes.Proc
launch(Launcher.ProcStarter ps)
Primarily invoked fromLauncher.ProcStarter.start()
to start a process with a specific launcher.hudson.remoting.Channel
launchChannel(OutputStream out, ProcessBuilder pb)
hudson.remoting.Channel
launchChannel(String[] cmd, OutputStream out, FilePath workDir, Map<String,String> envVars)
Launches a specified process and connects its input/output to aChannel
, then return it.-
Methods inherited from class hudson.Launcher
decorateByEnv, decorateByPrefix, decorateFor, getChannel, getComputer, getListener, isUnix, launch, launch, launch, launch, launch, launch, launch, launch, launch, launch, launch, launch, launch, maskedPrintCommandLine, maskedPrintCommandLine, prepareFilterRules, printCommandLine, setEnvVarsFilterRuleWrapper
-
-
-
-
Constructor Detail
-
LocalLauncher
public LocalLauncher(@NonNull TaskListener listener)
-
LocalLauncher
public LocalLauncher(TaskListener listener, hudson.remoting.VirtualChannel channel)
-
-
Method Detail
-
launch
public Proc launch(Launcher.ProcStarter ps) throws IOException
Description copied from class:Launcher
Primarily invoked fromLauncher.ProcStarter.start()
to start a process with a specific launcher.- Specified by:
launch
in classLauncher
- Throws:
IOException
-
launchChannel
public hudson.remoting.Channel launchChannel(String[] cmd, OutputStream out, FilePath workDir, Map<String,String> envVars) throws IOException
Description copied from class:Launcher
Launches a specified process and connects its input/output to aChannel
, then return it.When the returned channel is terminated, the process will be killed.
- Specified by:
launchChannel
in classLauncher
- Parameters:
cmd
- The commands.out
- Where the stderr from the launched process will be sent.workDir
- The working directory of the new process, ornull
to inherit from the current processenvVars
- Environment variable overrides. In addition to what the current process is inherited (if this is going to be launched from an agent, that becomes the "current" process), these variables will be also set.- Throws:
IOException
-
kill
public void kill(Map<String,String> modelEnvVars) throws InterruptedException
Description copied from class:Launcher
CallsProcessTree.killAll(Map)
to kill processes.- Specified by:
kill
in classLauncher
- Throws:
InterruptedException
-
launchChannel
public hudson.remoting.Channel launchChannel(OutputStream out, ProcessBuilder pb) throws IOException
- Parameters:
out
- Where the stderr from the launched process will be sent.- Throws:
IOException
-
-