hudson.slaves
Class JNLPLauncher

java.lang.Object
  extended by hudson.model.AbstractDescribableImpl<ComputerLauncher>
      extended by hudson.slaves.ComputerLauncher
          extended by hudson.slaves.JNLPLauncher
All Implemented Interfaces:
ExtensionPoint, Describable<ComputerLauncher>

public class JNLPLauncher
extends ComputerLauncher

ComputerLauncher via JNLP.

Author:
Stephen Connolly, Kohsuke Kawaguchi

Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
static Descriptor<ComputerLauncher> DESCRIPTOR
           
 String tunnel
          If the slave needs to tunnel the connection to the master, specify the "host:port" here.
 String vmargs
          Additional JVM arguments.
 
Fields inherited from class hudson.slaves.ComputerLauncher
LIST
 
Constructor Summary
JNLPLauncher()
           
JNLPLauncher(String tunnel, String vmargs)
           
 
Method Summary
 boolean isLaunchSupported()
          Returns true if this ComputerLauncher supports programatic launch of the slave agent in the target Computer.
 void launch(SlaveComputer computer, TaskListener listener)
          Launches the slave agent for the given Computer.
 
Methods inherited from class hudson.slaves.ComputerLauncher
afterDisconnect, afterDisconnect, beforeDisconnect, beforeDisconnect, checkJavaVersion, launch
 
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tunnel

public final String tunnel
If the slave needs to tunnel the connection to the master, specify the "host:port" here. This can include the special syntax "host:" and ":port" to indicate the default host/port shall be used.

Null if no tunneling is necessary.

Since:
1.250

vmargs

public final String vmargs
Additional JVM arguments. Can be null.

Since:
1.297

DESCRIPTOR

@Extension
public static final Descriptor<ComputerLauncher> DESCRIPTOR
Constructor Detail

JNLPLauncher

@DataBoundConstructor
public JNLPLauncher(String tunnel,
                                         String vmargs)

JNLPLauncher

public JNLPLauncher()
Method Detail

isLaunchSupported

public boolean isLaunchSupported()
Description copied from class: ComputerLauncher
Returns true if this ComputerLauncher supports programatic launch of the slave agent in the target Computer.

Overrides:
isLaunchSupported in class ComputerLauncher

launch

public void launch(SlaveComputer computer,
                   TaskListener listener)
Description copied from class: ComputerLauncher
Launches the slave agent for the given Computer.

If the slave 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.

Overrides:
launch in class ComputerLauncher
listener - The progress of the launch, as well as any error, should be sent to this listener.


Copyright © 2004-2013. All Rights Reserved.