Package hudson.remoting
Class Launcher
- java.lang.Object
-
- hudson.remoting.Launcher
-
-
Field Summary
Fields Modifier and Type Field Description String
agentJnlpCredentials
URL
agentJnlpURL
Deprecated.usesecret
,name
,urls
,webSocket
,tunnel
,workDir
,internalDir
, and/orfailIfWorkDirIsMissing
directly.File
agentLog
Specifies a destination for error logs.List<String>
args
String
auth
Deprecated.List<String>
candidateCertificates
InetSocketAddress
connectionTarget
Deprecated.removed without replacementString
directConnection
Connect directly to the TCP port specified, skipping the HTTP(S) connection parameter download.boolean
failIfWorkDirIsMissing
Fail the initialization if the workDir or internalDir are missing.boolean
headlessMode
Deprecated.removed without replacementString
instanceIdentity
The controller's instance identity.String
internalDir
Specifies a directory withinworkDir
, which stores all the remoting-internal files.File
jarCache
File
loggingConfigFilePath
Specified location of the property file with JUL settings.Channel.Mode
mode
String
name
boolean
noCertificateCheck
Disables HTTPs Certificate validation of the server when usingJnlpAgentEndpointResolver
.boolean
noKeepAlive
boolean
noReconnect
boolean
ping
Deprecated.removed without replacementList<String>
protocols
WheninstanceIdentity
is set, the agent skips connecting via http(s) where it normally obtains the configured protocols.String
proxyCredentials
String
secret
boolean
showHelp
Shows help message and then exitsboolean
showVersion
Shows version information and then exitsFile
tcpPortFile
Deprecated.removed without replacementString
tunnel
List<URL>
urls
static String
VERSION
Version number of Hudson this agent.jar is from.boolean
webSocket
Map<String,String>
webSocketHeaders
File
workDir
Specifies a default working directory of the remoting instance.
-
Constructor Summary
Constructors Constructor Description Launcher()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static String
getCommunicationProtocolName()
Get the name of the communication protocol used in the Launcher.static boolean
isWindows()
static void
main(InputStream is, OutputStream os)
static void
main(InputStream is, OutputStream os, Channel.Mode mode)
static void
main(InputStream is, OutputStream os, Channel.Mode mode, boolean performPing)
Deprecated.static void
main(InputStream is, OutputStream os, Channel.Mode mode, boolean performPing, JarCache cache)
static void
main(String... args)
void
run()
void
setAuth(String auth)
Deprecated.void
setConnectTo(String target)
Deprecated.removed without replacementvoid
setHeadlessMode(boolean headlessMode)
Deprecated.removed without replacementvoid
setPing(boolean ping)
Deprecated.removed without replacementvoid
setTcpPortFile(File tcpPortFile)
Deprecated.removed without replacementvoid
setTextMode(boolean b)
-
-
-
Field Detail
-
mode
public Channel.Mode mode
-
ping
@Deprecated public boolean ping
Deprecated.removed without replacement
-
agentLog
@CheckForNull public File agentLog
Specifies a destination for error logs. If specified, this option overrides the default destination withinworkDir
. If both this options andworkDir
is not set, the log will not be generated.- Since:
- 3.8
-
agentJnlpURL
@Deprecated public URL agentJnlpURL
Deprecated.usesecret
,name
,urls
,webSocket
,tunnel
,workDir
,internalDir
, and/orfailIfWorkDirIsMissing
directly.
-
agentJnlpCredentials
public String agentJnlpCredentials
-
secret
public String secret
-
name
public String name
-
proxyCredentials
public String proxyCredentials
-
tcpPortFile
@Deprecated public File tcpPortFile
Deprecated.removed without replacement
-
auth
@Deprecated public String auth
Deprecated.
-
jarCache
@CheckForNull public File jarCache
- Since:
- 2.24
-
loggingConfigFilePath
@CheckForNull public File loggingConfigFilePath
Specified location of the property file with JUL settings.- Since:
- 3.8
-
noCertificateCheck
public boolean noCertificateCheck
Disables HTTPs Certificate validation of the server when usingJnlpAgentEndpointResolver
. This option is managed by the-noCertificateCheck
option.
-
connectionTarget
@Deprecated public InetSocketAddress connectionTarget
Deprecated.removed without replacement
-
noReconnect
public boolean noReconnect
-
noKeepAlive
public boolean noKeepAlive
-
workDir
@CheckForNull public File 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
@NonNull public String 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
remoting
directory is consumed by other stuff.- Since:
- 3.8
-
failIfWorkDirIsMissing
public boolean failIfWorkDirIsMissing
Fail 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
public String tunnel
-
headlessMode
@Deprecated public boolean headlessMode
Deprecated.removed without replacement
-
webSocket
public boolean webSocket
-
directConnection
public String directConnection
Connect directly to the TCP port specified, skipping the HTTP(S) connection parameter download.- Since:
- 3.34
-
instanceIdentity
public String instanceIdentity
The controller's instance identity.- Since:
- 3.34
- See Also:
- Instance Identity
-
protocols
public List<String> protocols
WheninstanceIdentity
is 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 showHelp
Shows help message and then exits- Since:
- 3.36
-
showVersion
public boolean showVersion
Shows version information and then exits- Since:
- 3.36
-
args
@Deprecated public List<String> args
The original calling convention takes two positional arguments: secret key and agent name.
-
VERSION
public static final String VERSION
Version number of Hudson this agent.jar is from.
-
-
Method Detail
-
setTextMode
public void setTextMode(boolean b)
-
setPing
@Deprecated public void setPing(boolean ping)
Deprecated.removed without replacement
-
setTcpPortFile
@Deprecated public void setTcpPortFile(File tcpPortFile)
Deprecated.removed without replacement
-
setAuth
@Deprecated public void setAuth(String auth)
Deprecated.
-
setConnectTo
@Deprecated public void setConnectTo(String target)
Deprecated.removed without replacement
-
setHeadlessMode
@Deprecated public void setHeadlessMode(boolean headlessMode)
Deprecated.removed without replacement
-
main
public static void main(String... args) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
run
public void run() throws org.kohsuke.args4j.CmdLineException, IOException, InterruptedException
- Throws:
org.kohsuke.args4j.CmdLineException
IOException
InterruptedException
-
main
public static void main(InputStream is, OutputStream os) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
main
public static void main(InputStream is, OutputStream os, Channel.Mode mode) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
main
@Deprecated public static void main(InputStream is, OutputStream os, Channel.Mode mode, boolean performPing) throws IOException, InterruptedException
Deprecated.- Throws:
IOException
InterruptedException
-
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:
IOException
InterruptedException
- Since:
- 2.24
-
isWindows
public static boolean isWindows()
-
getCommunicationProtocolName
public static String 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
-
-