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 classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
-
Constructor Summary
ConstructorDescriptionSSHConnector
(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 TypeMethodDescriptionint
getPort()
launch
(String host, 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
void
setSuffixStartSlaveCmd
(String value) void
setTcpNoDelay
(Boolean tcpNoDelay) void
setWorkDir
(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. Ifnull
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.
-
-
Method Details
-
launch
- Specified by:
launch
in 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
-