Package hudson.slaves
Class Channels
java.lang.Object
hudson.slaves.Channels
Various convenient subtype of
Channel
s.- Author:
- Kohsuke Kawaguchi
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic hudson.remoting.Channel
forProcess
(String name, ExecutorService execService, InputStream in, OutputStream out, Proc proc) Deprecated.since 2009-04-13.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, Process proc, OutputStream header) static hudson.remoting.Channel
newJVM
(String displayName, TaskListener listener, FilePath workDir, ClasspathBuilder classpath, Map<String, String> systemProperties) Deprecated.removed without replacementstatic hudson.remoting.Channel
newJVM
(String displayName, TaskListener listener, JVMBuilder vmb, FilePath workDir, ClasspathBuilder classpath) Deprecated.removed without replacement
-
Constructor Details
-
Channels
public Channels()
-
-
Method Details
-
forProcess
@Deprecated public static hudson.remoting.Channel forProcess(String name, ExecutorService execService, InputStream in, OutputStream out, Proc proc) throws IOException Deprecated.since 2009-04-13. UseforProcess(String, ExecutorService, InputStream, OutputStream, OutputStream, Proc)
- Throws:
IOException
-
forProcess
public static hudson.remoting.Channel forProcess(String name, ExecutorService execService, InputStream in, OutputStream out, OutputStream header, Proc proc) throws IOException Creates a channel that wraps a remote process, so that when we shut down the connection we kill the process.- Throws:
IOException
-
forProcess
public static hudson.remoting.Channel forProcess(String name, ExecutorService execService, Process proc, OutputStream header) throws IOException - Throws:
IOException
-
newJVM
@Deprecated public static hudson.remoting.Channel newJVM(String displayName, TaskListener listener, FilePath workDir, ClasspathBuilder classpath, Map<String, String> systemProperties) throws IOExceptionDeprecated.removed without replacementLaunches a new JVM with the given classpath and system properties, establish a communication channel, and return aChannel
to it.- Parameters:
displayName
- Human readable name of what this JVM represents. For example "Selenium grid" or "Hadoop". This token is used for messages tolistener
.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 needagent.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.- Returns:
- never null
- Throws:
IOException
- Since:
- 1.300
-
newJVM
@Deprecated public static hudson.remoting.Channel newJVM(String displayName, TaskListener listener, JVMBuilder vmb, FilePath workDir, ClasspathBuilder classpath) throws IOException Deprecated.removed without replacementLaunches a new JVM with the given classpath, establish a communication channel, and return aChannel
to it.- Parameters:
displayName
- Human readable name of what this JVM represents. For example "Selenium grid" or "Hadoop". This token is used for messages tolistener
.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 needagent.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 configuredJVMBuilder
that allows the caller to fine-tune the launch parameter.- Returns:
- never null
- Throws:
IOException
- Since:
- 1.361
-