Class JNLPLauncher
- All Implemented Interfaces:
ExtensionPoint,Describable<ComputerLauncher>
ComputerLauncher via inbound connections.- Author:
- Stephen Connolly, Kohsuke Kawaguchi
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic Descriptor<ComputerLauncher> Deprecated.Deprecated (only used with deprecated-jnlpUrlmode), but cannot mark it as such without breaking CasC.final StringDeprecated.No longer used.Fields inherited from class hudson.slaves.ComputerLauncher
LIST -
Constructor Summary
ConstructorsConstructorDescriptionJNLPLauncher(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 StringOverrides 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-jnlpUrlmode), but cannot mark it as such without breaking CasC.getWorkDirOptions(Computer computer) Gets work directory options as a String.Deprecated (only used with deprecated-jnlpUrlmode), but cannot mark it as such without breaking CasC.booleanbooleanReturns true if thisComputerLaunchersupports programmatic launch of the agent in the targetComputer.booleanDeprecated (only used with deprecated-jnlpUrlmode), but cannot mark it as such without breaking CasC.voidlaunch(SlaveComputer computer, TaskListener listener) Launches the agent for the givenComputer.protected ObjectvoidDeprecated (only used with deprecated-jnlpUrlmode), but cannot mark it as such without breaking CasC.voidsetWebSocket(boolean webSocket) Deprecated (only used with deprecated-jnlpUrlmode), but cannot mark it as such without breaking CasC.final voidsetWorkDirSettings(RemotingWorkDirSettings workDirSettings) Deprecated (only used with deprecated-jnlpUrlmode), but cannot mark it as such without breaking CasC.Methods inherited from class hudson.slaves.ComputerLauncher
afterDisconnect, afterDisconnect, beforeDisconnect, beforeDisconnect, checkJavaVersion, launchMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.model.Describable
getDescriptor
-
Field Details
-
tunnel
Deprecated (only used with deprecated-jnlpUrlmode), 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-jnlpUrlmode), but cannot mark it as such without breaking CasC. -
setWorkDirSettings
@DataBoundSetter public final void setWorkDirSettings(@NonNull RemotingWorkDirSettings workDirSettings) Deprecated (only used with deprecated-jnlpUrlmode), but cannot mark it as such without breaking CasC. -
isLaunchSupported
public boolean isLaunchSupported()Description copied from class:ComputerLauncherReturns true if thisComputerLaunchersupports programmatic launch of the agent in the targetComputer.- Overrides:
isLaunchSupportedin classComputerLauncher
-
isWebSocket
public boolean isWebSocket()Deprecated (only used with deprecated-jnlpUrlmode), but cannot mark it as such without breaking CasC. -
setWebSocket
@DataBoundSetter public void setWebSocket(boolean webSocket) Deprecated (only used with deprecated-jnlpUrlmode), but cannot mark it as such without breaking CasC. -
getTunnel
Deprecated (only used with deprecated-jnlpUrlmode), but cannot mark it as such without breaking CasC. -
setTunnel
Deprecated (only used with deprecated-jnlpUrlmode), but cannot mark it as such without breaking CasC. -
launch
Description copied from class:ComputerLauncherLaunches 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:
launchin classComputerLauncher- Parameters:
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)