public static class Launcher.DecoratedLauncher extends Launcher
Launcher.DecoratedLauncher, Launcher.DummyLauncher, Launcher.IOTriplet, Launcher.LocalLauncher, Launcher.ProcStarter, Launcher.RemoteLauncher, Launcher.RemoteProcesschannel, listener, showFullPath| Constructor and Description |
|---|
DecoratedLauncher(Launcher inner) |
| Modifier and Type | Method and Description |
|---|---|
hudson.remoting.VirtualChannel |
getChannel()
Gets the channel that can be used to run a program remotely.
|
Computer |
getComputer()
|
Launcher |
getInner()
Gets nested launcher.
|
TaskListener |
getListener()
Gets the
TaskListener that this launcher uses to
report the commands that it's executing. |
boolean |
isUnix()
Returns true if this
Launcher is going to launch on Unix. |
void |
kill(Map<String,String> modelEnvVars)
Calls
ProcessTree.killAll(Map) to kill processes. |
Proc |
launch(Launcher.ProcStarter starter)
Primarily invoked from
Launcher.ProcStarter.start() to start a process with a specific launcher. |
Proc |
launch(String[] cmd,
boolean[] mask,
String[] env,
InputStream in,
OutputStream out,
FilePath workDir)
Launch a command with optional censoring of arguments from the listener (Note: The censored portions will
remain visible through /proc, pargs, process explorer, etc.
|
Proc |
launch(String[] cmd,
String[] env,
InputStream in,
OutputStream out,
FilePath workDir) |
hudson.remoting.Channel |
launchChannel(String[] cmd,
OutputStream out,
FilePath workDir,
Map<String,String> envVars)
Launches a specified process and connects its input/output to a
Channel, then
return it. |
String |
toString() |
decorateByEnv, decorateByPrefix, decorateFor, launch, launch, launch, launch, launch, launch, launch, launch, launch, launch, launch, maskedPrintCommandLine, maskedPrintCommandLine, printCommandLinepublic DecoratedLauncher(Launcher inner)
public Proc launch(Launcher.ProcStarter starter) throws IOException
LauncherLauncher.ProcStarter.start() to start a process with a specific launcher.launch in class LauncherIOExceptionpublic hudson.remoting.Channel launchChannel(String[] cmd, OutputStream out, FilePath workDir, Map<String,String> envVars) throws IOException, InterruptedException
LauncherChannel, then
return it.
When the returned channel is terminated, the process will be killed.
launchChannel in class Launcherout - Where the stderr from the launched process will be sent.workDir - The working directory of the new process, or null 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 a slave agent, that
becomes the "current" process), these variables will be also set.IOExceptionInterruptedExceptionpublic void kill(Map<String,String> modelEnvVars) throws IOException, InterruptedException
LauncherProcessTree.killAll(Map) to kill processes.kill in class LauncherIOExceptionInterruptedExceptionpublic boolean isUnix()
LauncherLauncher is going to launch on Unix.public Proc launch(String[] cmd, boolean[] mask, String[] env, InputStream in, OutputStream out, FilePath workDir) throws IOException
Launcherlaunch in class Launchercmd - The command and all it's arguments.mask - Which of the command and arguments should be masked from the listenerenv - Environment variable overrides.in - null if there's no input.out - stdout and stderr of the process will be sent to this stream. the stream won't be closed.workDir - null if the working directory could be anything.IOException - When there are IO problems.public Computer getComputer()
LauncherLauncher is encapsulating an execution on a specific Computer,
return it.
Because of the way internal Hudson abstractions are set up (that is, Launcher only
needs a VirtualChannel to do its job and isn't really required that the channel
comes from an existing Computer), this method may not always the right Computer instance.
getComputer in class LauncherComputer object.public TaskListener getListener()
LauncherTaskListener that this launcher uses to
report the commands that it's executing.getListener in class Launcherpublic hudson.remoting.VirtualChannel getChannel()
LaunchergetChannel in class Launcherpublic Proc launch(String[] cmd, String[] env, InputStream in, OutputStream out, FilePath workDir) throws IOException
launch in class Launcherenv - Environment variable overrides.in - null if there's no input.out - stdout and stderr of the process will be sent to this stream.
the stream won't be closed.workDir - null if the working directory could be anything.IOExceptionpublic Launcher getInner()
Copyright © 2019. All rights reserved.