Package hudson.plugins.sshslaves
Class SSHConnector
java.lang.Object
hudson.model.AbstractDescribableImpl<ComputerConnector>
hudson.slaves.ComputerConnector
hudson.plugins.sshslaves.SSHConnector
- All Implemented Interfaces:
ExtensionPoint,Describable<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.
- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSSHConnector(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. -
Method Summary
Modifier and TypeMethodDescriptionintgetPort()launch(String host, TaskListener listener) voidsetCredentialsId(String credentialsId) voidsetJavaPath(String value) voidsetJvmOptions(String value) voidsetLaunchTimeoutSeconds(Integer value) voidsetMaxNumRetries(Integer value) voidsetPort(int value) voidsetPrefixStartSlaveCmd(String value) voidsetRetryWaitTime(Integer value) voidvoidsetSuffixStartSlaveCmd(String value) voidsetTcpNoDelay(Boolean tcpNoDelay) voidsetWorkDir(String workDir) Methods inherited from class hudson.slaves.ComputerConnector
getDescriptor
-
Field Details
-
port
public int portField port
-
-
Constructor Details
-
SSHConnector
Constructor SSHLauncher creates a new SSHLauncher instance.- Parameters:
port- The port to connect on.credentialsId- The credentials id to connect as.
-
SSHConnector
public 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.- Parameters:
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. Ifnullthe 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.
-
-
Method Details
-
launch
- Specified by:
launchin classComputerConnector
-
setJvmOptions
-
setJavaPath
-
setPrefixStartSlaveCmd
-
setSuffixStartSlaveCmd
-
setMaxNumRetries
-
setLaunchTimeoutSeconds
-
setRetryWaitTime
-
setSshHostKeyVerificationStrategy
@DataBoundSetter public void setSshHostKeyVerificationStrategy(SshHostKeyVerificationStrategy value) -
setPort
public void setPort(int value) -
setTcpNoDelay
-
getSshHostKeyVerificationStrategy
-
setWorkDir
-
getCredentialsId
-
getPort
public int getPort() -
setCredentialsId
-
getJvmOptions
-
getJavaPath
-
getPrefixStartSlaveCmd
-
getSuffixStartSlaveCmd
-
getLaunchTimeoutSeconds
-
getMaxNumRetries
-
getRetryWaitTime
-
getWorkDir
-
getTcpNoDelay
-