Class JNLPLauncher
- All Implemented Interfaces:
ExtensionPoint
,Describable<ComputerLauncher>
ComputerLauncher
via inbound connections.- Author:
- Stephen Connolly, Kohsuke Kawaguchi
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static Descriptor<ComputerLauncher>
Deprecated.Deprecated (only used with deprecated-jnlpUrl
mode), but cannot mark it as such without breaking CasC.final String
Deprecated.No longer used.Fields inherited from class hudson.slaves.ComputerLauncher
LIST
-
Constructor Summary
ConstructorDescriptionJNLPLauncher
(boolean enableWorkDir) Deprecated.no useful properties, useJNLPLauncher()
JNLPLauncher
(String tunnel) Deprecated.no useful properties, useJNLPLauncher()
JNLPLauncher
(String tunnel, String vmargs) Deprecated.no useful properties, useJNLPLauncher()
JNLPLauncher
(String tunnel, String vmargs, RemotingWorkDirSettings workDirSettings) Deprecated.no useful properties, useJNLPLauncher()
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Overrides the url that inbound TCP agents should connect to as advertised in the agent.jnlp file.getRemotingOptionsUnix
(Computer computer) getRemotingOptionsWindows
(Computer computer) Deprecated (only used with deprecated-jnlpUrl
mode), but cannot mark it as such without breaking CasC.getWorkDirOptions
(Computer computer) Gets work directory options as a String.Deprecated (only used with deprecated-jnlpUrl
mode), but cannot mark it as such without breaking CasC.boolean
boolean
Returns true if thisComputerLauncher
supports programmatic launch of the agent in the targetComputer
.boolean
Deprecated (only used with deprecated-jnlpUrl
mode), but cannot mark it as such without breaking CasC.void
launch
(SlaveComputer computer, TaskListener listener) Launches the agent for the givenComputer
.protected Object
void
Deprecated (only used with deprecated-jnlpUrl
mode), but cannot mark it as such without breaking CasC.void
setWebSocket
(boolean webSocket) Deprecated (only used with deprecated-jnlpUrl
mode), but cannot mark it as such without breaking CasC.final void
setWorkDirSettings
(RemotingWorkDirSettings workDirSettings) Deprecated (only used with deprecated-jnlpUrl
mode), but cannot mark it as such without breaking CasC.Methods inherited from class hudson.slaves.ComputerLauncher
afterDisconnect, afterDisconnect, beforeDisconnect, beforeDisconnect, checkJavaVersion, launch
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
Field Details
-
tunnel
Deprecated (only used with deprecated-jnlpUrl
mode), but cannot mark it as such without breaking CasC. -
vmargs
Deprecated.No longer used. -
CUSTOM_INBOUND_URL_PROPERTY
@NonNull @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static final String CUSTOM_INBOUND_URL_PROPERTY- See Also:
-
DESCRIPTOR
@Deprecated @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static Descriptor<ComputerLauncher> DESCRIPTORDeprecated.as of 1.XXX UseJenkins.getDescriptor(Class)
-
-
Constructor Details
-
JNLPLauncher
@Deprecated public JNLPLauncher(@CheckForNull String tunnel, @CheckForNull String vmargs, @CheckForNull RemotingWorkDirSettings workDirSettings) Deprecated.no useful properties, useJNLPLauncher()
-
JNLPLauncher
Deprecated.no useful properties, useJNLPLauncher()
-
JNLPLauncher
Deprecated.no useful properties, useJNLPLauncher()
-
JNLPLauncher
@DataBoundConstructor public JNLPLauncher() -
JNLPLauncher
Deprecated.no useful properties, useJNLPLauncher()
-
-
Method Details
-
readResolve
-
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 thisComputerLauncher
supports programmatic launch of the agent in the targetComputer
.- Overrides:
isLaunchSupported
in classComputerLauncher
-
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
Deprecated (only used with deprecated-jnlpUrl
mode), but cannot mark it as such without breaking CasC. -
setTunnel
Deprecated (only used with deprecated-jnlpUrl
mode), but cannot mark it as such without breaking CasC. -
launch
Description copied from class:ComputerLauncher
Launches the agent for the givenComputer
.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 throughStreamTaskListener
.) 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, useComputer.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 classComputerLauncher
listener
- The progress of the launch, as well as any error, should be sent to this listener.
-
getRemotingOptionsUnix
-
getRemotingOptionsWindows
-
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 APIgetWorkDirSettings().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:
-
Jenkins.getDescriptor(Class)