public class Channels extends Object
Channel
s.Constructor and Description |
---|
Channels() |
Modifier and Type | Method and Description |
---|---|
static hudson.remoting.Channel |
forProcess(String name,
ExecutorService execService,
InputStream in,
OutputStream out,
OutputStream header,
Proc proc)
Creates a channel that wraps a remote process, so that when we shut down the connection
we kill the process.
|
static hudson.remoting.Channel |
forProcess(String name,
ExecutorService execService,
InputStream in,
OutputStream out,
Proc proc)
Deprecated.
since 2009-04-13.
Use
forProcess(String, ExecutorService, InputStream, OutputStream, OutputStream, Proc) |
static hudson.remoting.Channel |
forProcess(String name,
ExecutorService execService,
Process proc,
OutputStream header) |
static hudson.remoting.Channel |
newJVM(String displayName,
TaskListener listener,
FilePath workDir,
ClasspathBuilder classpath,
Map<String,String> systemProperties)
Launches a new JVM with the given classpath and system properties, establish a communication channel,
and return a
Channel to it. |
static hudson.remoting.Channel |
newJVM(String displayName,
TaskListener listener,
JVMBuilder vmb,
FilePath workDir,
ClasspathBuilder classpath)
Launches a new JVM with the given classpath, establish a communication channel,
and return a
Channel to it. |
@Deprecated public static hudson.remoting.Channel forProcess(String name, ExecutorService execService, InputStream in, OutputStream out, Proc proc) throws IOException
forProcess(String, ExecutorService, InputStream, OutputStream, OutputStream, Proc)
IOException
public static hudson.remoting.Channel forProcess(String name, ExecutorService execService, InputStream in, OutputStream out, OutputStream header, Proc proc) throws IOException
IOException
public static hudson.remoting.Channel forProcess(String name, ExecutorService execService, Process proc, OutputStream header) throws IOException
IOException
public static hudson.remoting.Channel newJVM(String displayName, TaskListener listener, FilePath workDir, ClasspathBuilder classpath, Map<String,String> systemProperties) throws IOException
Channel
to it.displayName
- Human readable name of what this JVM represents. For example "Selenium grid" or "Hadoop".
This token is used for messages to listener
.listener
- The progress of the launcher and the failure information will be sent here. Must not be null.workDir
- If non-null, the new JVM will have this directory as the working directory. This must be a local path.classpath
- The classpath of the new JVM. Can be null if you just need agent.jar
(and everything else
can be sent over the channel.) But if you have jars that are known to be necessary by the new JVM,
setting it here will improve the classloading performance (by avoiding remote class file transfer.)
Classes in this classpath will also take precedence over any other classes that's sent via the channel
later, so it's also useful for making sure you get the version of the classes you want.systemProperties
- If the new JVM should have a certain system properties set. Can be null.IOException
public static hudson.remoting.Channel newJVM(String displayName, TaskListener listener, JVMBuilder vmb, FilePath workDir, ClasspathBuilder classpath) throws IOException
Channel
to it.displayName
- Human readable name of what this JVM represents. For example "Selenium grid" or "Hadoop".
This token is used for messages to listener
.listener
- The progress of the launcher and the failure information will be sent here. Must not be null.workDir
- If non-null, the new JVM will have this directory as the working directory. This must be a local path.classpath
- The classpath of the new JVM. Can be null if you just need agent.jar
(and everything else
can be sent over the channel.) But if you have jars that are known to be necessary by the new JVM,
setting it here will improve the classloading performance (by avoiding remote class file transfer.)
Classes in this classpath will also take precedence over any other classes that's sent via the channel
later, so it's also useful for making sure you get the version of the classes you want.vmb
- A partially configured JVMBuilder
that allows the caller to fine-tune the launch parameter.IOException
Copyright © 2004–2021. All rights reserved.