Package hudson.remoting
Class Launcher
java.lang.Object
hudson.remoting.Launcher
- Direct Known Subclasses:
Main
Entry point for running a
Channel. This is the main method of the agent JVM.
This class also defines several methods for starting a channel on a fresh JVM.
- Author:
- Kohsuke Kawaguchi
-
Field Summary
FieldsModifier and TypeFieldDescriptionDeprecated.Specifies a destination for error logs.Deprecated.Deprecated.removed without replacementConnect directly to the TCP port specified, skipping the HTTP(S) connection parameter download.booleanFail the initialization if the workDir or internalDir are missing.booleanDeprecated.removed without replacementThe controller's instance identity.Specifies a directory withinworkDir, which stores all the remoting-internal files.Specified location of the property file with JUL settings.booleanDisables HTTPs Certificate validation of the server when usingJnlpAgentEndpointResolver.booleanbooleanbooleanDeprecated.removed without replacementWheninstanceIdentityis set, the agent skips connecting via http(s) where it normally obtains the configured protocols.booleanShows help message and then exitsbooleanShows version information and then exitsDeprecated.removed without replacementstatic final StringVersion number of Hudson this agent.jar is from.booleanSpecifies a default working directory of the remoting instance. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringGet the name of the communication protocol used in the Launcher.static booleanstatic voidmain(InputStream is, OutputStream os) static voidmain(InputStream is, OutputStream os, Channel.Mode mode) static voidmain(InputStream is, OutputStream os, Channel.Mode mode, boolean performPing) Deprecated.static voidmain(InputStream is, OutputStream os, Channel.Mode mode, boolean performPing, JarCache cache) static voidvoidrun()voidDeprecated.voidsetConnectTo(String target) Deprecated.removed without replacementvoidsetHeadlessMode(boolean headlessMode) Deprecated.removed without replacementvoidsetPing(boolean ping) Deprecated.removed without replacementvoidsetTcpPortFile(File tcpPortFile) Deprecated.removed without replacementvoidsetTextMode(boolean b)
-
Field Details
-
mode
-
ping
Deprecated.removed without replacement -
agentLog
Specifies a destination for error logs. If specified, this option overrides the default destination withinworkDir. If both this options andworkDiris not set, the log will not be generated.- Since:
- 3.8
-
agentJnlpURL
Deprecated.usesecret,name,urls,webSocket,tunnel,workDir,internalDir, and/orfailIfWorkDirIsMissingdirectly. -
agentJnlpCredentials
-
secret
-
name
-
proxyCredentials
-
tcpPortFile
Deprecated.removed without replacement -
auth
Deprecated. -
jarCache
- Since:
- 2.24
-
loggingConfigFilePath
Specified location of the property file with JUL settings.- Since:
- 3.8
-
candidateCertificates
-
noCertificateCheck
public boolean noCertificateCheckDisables HTTPs Certificate validation of the server when usingJnlpAgentEndpointResolver. This option is managed by the-noCertificateCheckoption. -
connectionTarget
Deprecated.removed without replacement -
noReconnect
public boolean noReconnect -
noReconnectAfter
-
noKeepAlive
public boolean noKeepAlive -
workDir
Specifies a default working directory of the remoting instance. If specified, this directory will be used to store logs, JAR cache, etc.In order to retain compatibility, the option is disabled by default.
Jenkins specifics: This working directory is expected to be equal to the agent root specified in Jenkins configuration.
- Since:
- 3.8
-
internalDir
Specifies a directory withinworkDir, which stores all the remoting-internal files.This option is not expected to be used frequently, but it allows remoting users to specify a custom storage directory if the default
remotingdirectory is consumed by other stuff.- Since:
- 3.8
-
failIfWorkDirIsMissing
public boolean failIfWorkDirIsMissingFail the initialization if the workDir or internalDir are missing. This option presumes that the workspace structure gets initialized previously in order to ensure that we do not start up with a borked instance (e.g. if a filesystem mount gets disconnected).- Since:
- 3.8
-
tunnel
-
headlessMode
Deprecated.removed without replacement -
urls
-
webSocket
public boolean webSocket -
webSocketHeaders
-
directConnection
Connect directly to the TCP port specified, skipping the HTTP(S) connection parameter download.- Since:
- 3.34
-
instanceIdentity
The controller's instance identity.- Since:
- 3.34
- See Also:
-
protocols
WheninstanceIdentityis set, the agent skips connecting via http(s) where it normally obtains the configured protocols. When no protocols are given the agent tries all protocols it knows. Use this to limit the protocol list.- Since:
- 3.34
-
showHelp
public boolean showHelpShows help message and then exits- Since:
- 3.36
-
showVersion
public boolean showVersionShows version information and then exits- Since:
- 3.36
-
args
The original calling convention takes two positional arguments: secret key and agent name. -
VERSION
Version number of Hudson this agent.jar is from.
-
-
Constructor Details
-
Launcher
public Launcher()
-
-
Method Details
-
setTextMode
public void setTextMode(boolean b) -
setPing
Deprecated.removed without replacement -
setTcpPortFile
Deprecated.removed without replacement -
setAuth
Deprecated. -
setConnectTo
Deprecated.removed without replacement -
setHeadlessMode
Deprecated.removed without replacement -
main
- Throws:
IOExceptionInterruptedException
-
run
- Throws:
org.kohsuke.args4j.CmdLineExceptionIOExceptionInterruptedException
-
main
- Throws:
IOExceptionInterruptedException
-
main
public static void main(InputStream is, OutputStream os, Channel.Mode mode) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
main
@Deprecated public static void main(InputStream is, OutputStream os, Channel.Mode mode, boolean performPing) throws IOException, InterruptedException Deprecated.- Throws:
IOExceptionInterruptedException
-
main
public static void main(InputStream is, OutputStream os, Channel.Mode mode, boolean performPing, @CheckForNull JarCache cache) throws IOException, InterruptedException - Parameters:
cache- JAR cache to be used. Ifnull, a default value will be used.- Throws:
IOExceptionInterruptedException- Since:
- 2.24
-
isWindows
public static boolean isWindows() -
getCommunicationProtocolName
Get the name of the communication protocol used in the Launcher. When the channel is established by an Engine instance (that is, using JNLP), useEngine.getProtocolName()instead.- Returns:
- the communication protocol name.
- Since:
- 4.8
-
secret,name,urls,webSocket,tunnel,workDir,internalDir, and/orfailIfWorkDirIsMissingdirectly.