public class JNLPLauncher extends ComputerLauncher
ComputerLauncher
via JNLP.Modifier and Type | Class and Description |
---|---|
static class |
JNLPLauncher.DescriptorImpl |
static class |
JNLPLauncher.DescriptorVisibilityFilterImpl
Hides the JNLP launcher when the JNLP agent port is not enabled.
|
ExtensionPoint.LegacyInstancesAreScopedToHudson
Modifier and Type | Field and Description |
---|---|
static Descriptor<ComputerLauncher> |
DESCRIPTOR
Deprecated.
as of 1.XXX
Use
Jenkins.getDescriptor(Class) |
String |
tunnel
If the agent needs to tunnel the connection to the master,
specify the "host:port" here.
|
String |
vmargs
Additional JVM arguments.
|
LIST
Constructor and Description |
---|
JNLPLauncher()
Deprecated.
This Launcher does not enable the work directory.
It is recommended to use
JNLPLauncher(boolean) |
JNLPLauncher(boolean enableWorkDir)
Constructor with default options.
|
JNLPLauncher(String tunnel,
String vmargs)
Deprecated.
|
JNLPLauncher(String tunnel,
String vmargs,
RemotingWorkDirSettings workDirSettings) |
Modifier and Type | Method and Description |
---|---|
String |
getWorkDirOptions(Computer computer)
Gets work directory options as a String.
|
RemotingWorkDirSettings |
getWorkDirSettings()
Returns work directory settings.
|
boolean |
isLaunchSupported()
Returns true if this
ComputerLauncher supports
programatic launch of the agent in the target Computer . |
void |
launch(SlaveComputer computer,
TaskListener listener)
Launches the agent for the given
Computer . |
protected Object |
readResolve() |
afterDisconnect, afterDisconnect, beforeDisconnect, beforeDisconnect, checkJavaVersion, launch
getDescriptor
@CheckForNull public final String tunnel
Null if no tunneling is necessary.
@CheckForNull public final String vmargs
public static Descriptor<ComputerLauncher> DESCRIPTOR
Jenkins.getDescriptor(Class)
@DataBoundConstructor public JNLPLauncher(@CheckForNull String tunnel, @CheckForNull String vmargs, @Nonnull RemotingWorkDirSettings workDirSettings)
@Deprecated public JNLPLauncher(String tunnel, String vmargs)
@Deprecated public JNLPLauncher()
JNLPLauncher(boolean)
public JNLPLauncher(boolean enableWorkDir)
enableWorkDir
- If true
, the work directory will be enabled with default settings.protected Object readResolve()
@Nonnull public RemotingWorkDirSettings getWorkDirSettings()
public boolean isLaunchSupported()
ComputerLauncher
ComputerLauncher
supports
programatic launch of the agent in the target Computer
.isLaunchSupported
in class ComputerLauncher
public void launch(SlaveComputer computer, TaskListener listener)
ComputerLauncher
Computer
.
If the agent is launched successfully, SlaveComputer.setChannel(InputStream, OutputStream, TaskListener, Channel.Listener)
should be invoked in the end to notify Hudson of the established connection.
The operation could also fail, in which case there's no need to make any callback notification,
(except to notify the user of the failure through StreamTaskListener
.)
Also note that the normal return of this method call does not necessarily signify a successful launch.
If someone programmatically calls this method and wants to find out if the launch was a success,
use Computer.isOnline()
at the end.
This method must operate synchronously. Asynchrony is provided by Computer.connect(boolean)
and
its correct operation depends on this.
launch
in class ComputerLauncher
listener
- The progress of the launch, as well as any error, should be sent to this listener.@Nonnull @Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public String getWorkDirOptions(@Nonnull Computer computer)
getWorkDirSettings().toCommandLineArgs(computer)
should be used insteadcomputer
- ComputerCopyright © 2004–2018. All rights reserved.