hudson
Class Launcher.RemoteLauncher

java.lang.Object
  extended by hudson.Launcher
      extended by hudson.Launcher.RemoteLauncher
Enclosing class:
Launcher

public static class Launcher.RemoteLauncher
extends Launcher

Launches processes remotely by using the given channel.


Nested Class Summary
static class Launcher.RemoteLauncher.ProcImpl
           
 
Nested classes/interfaces inherited from class hudson.Launcher
Launcher.IOTriplet, Launcher.LocalLauncher, Launcher.ProcStarter, Launcher.RemoteLauncher, Launcher.RemoteProcess
 
Field Summary
 
Fields inherited from class hudson.Launcher
channel, listener, showFullPath
 
Constructor Summary
Launcher.RemoteLauncher(TaskListener listener, hudson.remoting.VirtualChannel channel, boolean isUnix)
           
 
Method Summary
 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 ps)
          Primarily invoked from Launcher.ProcStarter.start() to start a process with a specific launcher.
 hudson.remoting.Channel launchChannel(String[] cmd, OutputStream err, FilePath _workDir, Map<String,String> envOverrides)
          Launches a specified process and connects its input/output to a Channel, then return it.
 
Methods inherited from class hudson.Launcher
decorateByEnv, decorateByPrefix, decorateFor, getChannel, getComputer, getListener, launch, launch, launch, launch, launch, launch, launch, launch, launch, launch, launch, launch, launch, maskedPrintCommandLine, maskedPrintCommandLine, printCommandLine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Launcher.RemoteLauncher

public Launcher.RemoteLauncher(TaskListener listener,
                               hudson.remoting.VirtualChannel channel,
                               boolean isUnix)
Method Detail

launch

public Proc launch(Launcher.ProcStarter ps)
            throws IOException
Description copied from class: Launcher
Primarily invoked from Launcher.ProcStarter.start() to start a process with a specific launcher.

Specified by:
launch in class Launcher
Throws:
IOException

launchChannel

public hudson.remoting.Channel launchChannel(String[] cmd,
                                             OutputStream err,
                                             FilePath _workDir,
                                             Map<String,String> envOverrides)
                                      throws IOException,
                                             InterruptedException
Description copied from class: Launcher
Launches a specified process and connects its input/output to a Channel, then return it.

When the returned channel is terminated, the process will be killed.

Specified by:
launchChannel in class Launcher
err - 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 process
envOverrides - 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.
Throws:
IOException
InterruptedException

isUnix

public boolean isUnix()
Description copied from class: Launcher
Returns true if this Launcher is going to launch on Unix.

Overrides:
isUnix in class Launcher

kill

public void kill(Map<String,String> modelEnvVars)
          throws IOException,
                 InterruptedException
Description copied from class: Launcher
Calls ProcessTree.killAll(Map) to kill processes.

Specified by:
kill in class Launcher
Throws:
IOException
InterruptedException


Copyright © 2004-2013. All Rights Reserved.