Class Launcher

java.lang.Object
hudson.remoting.Launcher
Direct Known Subclasses:
Main

public class Launcher extends Object
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 Details

    • 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 within workDir. If both this options and workDir is not set, the log will not be generated.
      Since:
      3.8
    • agentJnlpURL

      @Deprecated public URL agentJnlpURL
      Deprecated.
    • 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
    • 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
    • candidateCertificates

      public List<String> candidateCertificates
    • noCertificateCheck

      public boolean noCertificateCheck
      Disables HTTPs Certificate validation of the server when using JnlpAgentEndpointResolver. This option is managed by the -noCertificateCheck option.
    • connectionTarget

      @Deprecated public InetSocketAddress connectionTarget
      Deprecated.
      removed without replacement
    • noReconnect

      public boolean noReconnect
    • noReconnectAfter

      public Duration noReconnectAfter
    • 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 within workDir, 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
    • urls

      public List<URL> urls
    • webSocket

      public boolean webSocket
    • webSocketHeaders

      public Map<String,String> webSocketHeaders
    • 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:
    • protocols

      public List<String> protocols
      When instanceIdentity 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
      Deprecated.
      use secret and name
      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.
  • Constructor Details

    • Launcher

      public Launcher()
  • Method Details