public class RemotingWorkDirSettings extends Object implements Describable<RemotingWorkDirSettings>
Modifier and Type | Class and Description |
---|---|
static class |
RemotingWorkDirSettings.DescriptorImpl |
Constructor and Description |
---|
RemotingWorkDirSettings() |
RemotingWorkDirSettings(boolean disabled,
String workDirPath,
String internalDir,
boolean failIfWorkDirIsMissing) |
Modifier and Type | Method and Description |
---|---|
Descriptor<RemotingWorkDirSettings> |
getDescriptor()
Gets the descriptor for this instance.
|
static RemotingWorkDirSettings |
getDisabledDefaults()
Gets default settings for the disabled work directory.
|
static RemotingWorkDirSettings |
getEnabledDefaults()
Gets default settings of the enabled work directory.
|
String |
getInternalDir() |
String |
getWorkDirPath()
Gets path to the custom workdir path.
|
boolean |
isDisabled()
Check if workdir is disabled.
|
boolean |
isFailIfWorkDirIsMissing()
Check if startup should fail if the workdir is missing.
|
boolean |
isUseAgentRootDir()
Indicates that agent root directory should be used as work directory.
|
List<String> |
toCommandLineArgs(SlaveComputer computer)
Gets list of command-line arguments for the work directory.
|
String |
toCommandLineString(SlaveComputer computer)
Gets a command line string, which can be passed to agent start command.
|
@DataBoundConstructor public RemotingWorkDirSettings(boolean disabled, @CheckForNull String workDirPath, @CheckForNull String internalDir, boolean failIfWorkDirIsMissing)
public RemotingWorkDirSettings()
public boolean isDisabled()
true
if the property is disabled.
In such case Remoting will use the legacy mode.public boolean isUseAgentRootDir()
true
if the agent root should be a work directory.public boolean isFailIfWorkDirIsMissing()
true
if Remoting should fail if the the work directory is missing instead of creating it@CheckForNull public String getWorkDirPath()
null
, an agent root directory path should be used instead.@NonNull public String getInternalDir()
public Descriptor<RemotingWorkDirSettings> getDescriptor()
Describable
Descriptor
is a singleton for every concrete Describable
implementation, so if a.getClass() == b.getClass()
then by default
a.getDescriptor() == b.getDescriptor()
as well.
(In rare cases a single implementation class may be used for instances with distinct descriptors.)
getDescriptor
in interface Describable<RemotingWorkDirSettings>
public List<String> toCommandLineArgs(@NonNull SlaveComputer computer)
computer
- Computer, for which the arguments are being created@NonNull @Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public String toCommandLineString(@NonNull SlaveComputer computer)
computer
- Computer, for which the arguments need to be constructed.SlaveComputer
.@NonNull public static RemotingWorkDirSettings getDisabledDefaults()
@NonNull public static RemotingWorkDirSettings getEnabledDefaults()
Copyright © 2004–2021. All rights reserved.