public class SSHConnector
extends hudson.slaves.ComputerConnector
ComputerConnector for SSHLauncher.
Significant code duplication between this and SSHLauncher because of the historical reason.
Newer plugins like this should define a separate Describable connection parameter class and have
connector and launcher share them.
| Modifier and Type | Class and Description |
|---|---|
static class |
SSHConnector.DescriptorImpl |
| Modifier and Type | Field and Description |
|---|---|
int |
port
Field port
|
| Constructor and Description |
|---|
SSHConnector(int port,
String credentialsId)
Constructor SSHLauncher creates a new SSHLauncher instance.
|
SSHConnector(int port,
String credentialsId,
String jvmOptions,
String javaPath,
String prefixStartSlaveCmd,
String suffixStartSlaveCmd,
Integer launchTimeoutSeconds,
Integer maxNumRetries,
Integer retryWaitTime,
SshHostKeyVerificationStrategy sshHostKeyVerificationStrategy)
Constructor SSHConnector creates a new SSHConnector instance.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getCredentialsId() |
String |
getJavaPath() |
String |
getJvmOptions() |
Integer |
getLaunchTimeoutSeconds() |
Integer |
getMaxNumRetries() |
int |
getPort() |
String |
getPrefixStartSlaveCmd() |
Integer |
getRetryWaitTime() |
SshHostKeyVerificationStrategy |
getSshHostKeyVerificationStrategy() |
String |
getSuffixStartSlaveCmd() |
Boolean |
getTcpNoDelay() |
String |
getWorkDir() |
SSHLauncher |
launch(String host,
hudson.model.TaskListener listener) |
void |
setCredentialsId(String credentialsId) |
void |
setJavaPath(String value) |
void |
setJvmOptions(String value) |
void |
setLaunchTimeoutSeconds(Integer value) |
void |
setMaxNumRetries(Integer value) |
void |
setPort(int value) |
void |
setPrefixStartSlaveCmd(String value) |
void |
setRetryWaitTime(Integer value) |
void |
setSshHostKeyVerificationStrategy(SshHostKeyVerificationStrategy value) |
void |
setSuffixStartSlaveCmd(String value) |
void |
setTcpNoDelay(Boolean tcpNoDelay) |
void |
setWorkDir(String workDir) |
@DataBoundConstructor
public SSHConnector(int port,
String credentialsId)
port - The port to connect on.credentialsId - The credentials id to connect as.public SSHConnector(int port,
String credentialsId,
String jvmOptions,
String javaPath,
String prefixStartSlaveCmd,
String suffixStartSlaveCmd,
Integer launchTimeoutSeconds,
Integer maxNumRetries,
Integer retryWaitTime,
SshHostKeyVerificationStrategy sshHostKeyVerificationStrategy)
port - The port to connect on.credentialsId - The credentials id to connect as.jvmOptions - Options passed to the java vm.javaPath - Path to the host jdk installation. If null the jdk will be auto detected.prefixStartSlaveCmd - This will prefix the start agent command. For instance if you want to execute the command with a different shell.suffixStartSlaveCmd - This will suffix the start agent command.launchTimeoutSeconds - Launch timeout in secondsmaxNumRetries - The number of times to retry connection if the SSH connection is refused during initial connectretryWaitTime - The number of seconds to wait between retriessshHostKeyVerificationStrategy - Host key verification method selected.public SSHLauncher launch(String host, hudson.model.TaskListener listener)
launch in class hudson.slaves.ComputerConnector@DataBoundSetter public void setJvmOptions(String value)
@DataBoundSetter public void setJavaPath(String value)
@DataBoundSetter public void setPrefixStartSlaveCmd(String value)
@DataBoundSetter public void setSuffixStartSlaveCmd(String value)
@DataBoundSetter public void setMaxNumRetries(Integer value)
@DataBoundSetter public void setLaunchTimeoutSeconds(Integer value)
@DataBoundSetter public void setRetryWaitTime(Integer value)
@DataBoundSetter public void setSshHostKeyVerificationStrategy(SshHostKeyVerificationStrategy value)
public void setPort(int value)
@DataBoundSetter public void setTcpNoDelay(Boolean tcpNoDelay)
public SshHostKeyVerificationStrategy getSshHostKeyVerificationStrategy()
@DataBoundSetter public void setWorkDir(String workDir)
public String getCredentialsId()
public int getPort()
public void setCredentialsId(String credentialsId)
public String getJvmOptions()
public String getJavaPath()
public String getPrefixStartSlaveCmd()
public String getSuffixStartSlaveCmd()
public Integer getLaunchTimeoutSeconds()
public Integer getMaxNumRetries()
public Integer getRetryWaitTime()
public String getWorkDir()
public Boolean getTcpNoDelay()
Copyright © 2016–2020. All rights reserved.