Package hudson.slaves

Class JNLPLauncher

All Implemented Interfaces:
ExtensionPoint, Describable<ComputerLauncher>

public class JNLPLauncher extends ComputerLauncher
ComputerLauncher via inbound connections.
Author:
Stephen Connolly, Kohsuke Kawaguchi
  • Field Details

  • Constructor Details

  • Method Details

    • readResolve

      protected Object readResolve()
    • getWorkDirSettings

      public RemotingWorkDirSettings getWorkDirSettings()
      Deprecated (only used with deprecated -jnlpUrl mode), but cannot mark it as such without breaking CasC.
    • setWorkDirSettings

      @DataBoundSetter public final void setWorkDirSettings(@NonNull RemotingWorkDirSettings workDirSettings)
      Deprecated (only used with deprecated -jnlpUrl mode), but cannot mark it as such without breaking CasC.
    • isLaunchSupported

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

      public boolean isWebSocket()
      Deprecated (only used with deprecated -jnlpUrl mode), but cannot mark it as such without breaking CasC.
    • setWebSocket

      @DataBoundSetter public void setWebSocket(boolean webSocket)
      Deprecated (only used with deprecated -jnlpUrl mode), but cannot mark it as such without breaking CasC.
    • getTunnel

      public String getTunnel()
      Deprecated (only used with deprecated -jnlpUrl mode), but cannot mark it as such without breaking CasC.
    • setTunnel

      @DataBoundSetter public void setTunnel(String tunnel)
      Deprecated (only used with deprecated -jnlpUrl mode), but cannot mark it as such without breaking CasC.
    • launch

      public void launch(SlaveComputer computer, TaskListener listener)
      Description copied from class: ComputerLauncher
      Launches the agent for the given 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.

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

      @NonNull @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public String getRemotingOptionsUnix(@NonNull Computer computer)
    • getRemotingOptionsWindows

      @NonNull @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public String getRemotingOptionsWindows(@NonNull Computer computer)
    • isConfigured

      @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public boolean isConfigured()
    • getWorkDirOptions

      @NonNull @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public String getWorkDirOptions(@NonNull Computer computer)
      Gets work directory options as a String. In public API getWorkDirSettings().toCommandLineArgs(computer) should be used instead
      Parameters:
      computer - Computer
      Returns:
      Command line options for launching with the WorkDir
    • getInboundAgentUrl

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static String getInboundAgentUrl()
      Overrides the url that inbound TCP agents should connect to as advertised in the agent.jnlp file. If not set, the default behavior is unchanged and returns the root URL. This enables using a private address for inbound tcp agents, separate from Jenkins root URL.
      See Also: