Class RemotingWorkDirSettings

    • Constructor Detail

      • RemotingWorkDirSettings

        @DataBoundConstructor
        public RemotingWorkDirSettings​(boolean disabled,
                                       @CheckForNull
                                       String workDirPath,
                                       @CheckForNull
                                       String internalDir,
                                       boolean failIfWorkDirIsMissing)
      • RemotingWorkDirSettings

        public RemotingWorkDirSettings()
    • Method Detail

      • isDisabled

        public boolean isDisabled()
        Check if workdir is disabled.
        Returns:
        true if the property is disabled. In such case Remoting will use the legacy mode.
      • isUseAgentRootDir

        public boolean isUseAgentRootDir()
        Indicates that agent root directory should be used as work directory.
        Returns:
        true if the agent root should be a work directory.
      • isFailIfWorkDirIsMissing

        public boolean isFailIfWorkDirIsMissing()
        Check if startup should fail if the workdir is missing.
        Returns:
        true if Remoting should fail if the the work directory is missing instead of creating it
      • getWorkDirPath

        @CheckForNull
        public String getWorkDirPath()
        Gets path to the custom workdir path.
        Returns:
        Custom workdir path. If null, an agent root directory path should be used instead.
      • getInternalDir

        @NonNull
        public String getInternalDir()
      • toCommandLineArgs

        public List<String> toCommandLineArgs​(@NonNull
                                              SlaveComputer computer)
        Gets list of command-line arguments for the work directory.
        Parameters:
        computer - Computer, for which the arguments are being created
        Returns:
        Non-modifiable list of command-line arguments
      • toCommandLineString

        @NonNull
        @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
        public String toCommandLineString​(@NonNull
                                          SlaveComputer computer)
        Gets a command line string, which can be passed to agent start command.
        Parameters:
        computer - Computer, for which the arguments need to be constructed.
        Returns:
        Command line arguments. It may be empty if the working directory is disabled or if the Computer type is not SlaveComputer.
      • getDisabledDefaults

        @NonNull
        public static RemotingWorkDirSettings getDisabledDefaults()
        Gets default settings for the disabled work directory.
        Returns:
        Legacy value: disabled work directory.
      • getEnabledDefaults

        @NonNull
        public static RemotingWorkDirSettings getEnabledDefaults()
        Gets default settings of the enabled work directory.