hudson.plugins.sshslaves
Class SSHConnector

java.lang.Object
  extended by hudson.model.AbstractDescribableImpl<hudson.slaves.ComputerConnector>
      extended by hudson.slaves.ComputerConnector
          extended by hudson.plugins.sshslaves.SSHConnector
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.slaves.ComputerConnector>

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.

Author:
Kohsuke Kawaguchi

Nested Class Summary
static class SSHConnector.DescriptorImpl
           
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 String javaPath
          Field javaPath.
 hudson.tools.JDKInstaller jdkInstaller
          Field jdk
 String jvmOptions
          Field jvmOptions.
 hudson.util.Secret password
          Deprecated.  
 int port
          Field port
 String prefixStartSlaveCmd
          Field prefixStartSlaveCmd.
 String privatekey
          Deprecated.  
 String suffixStartSlaveCmd
          Field suffixStartSlaveCmd.
 String username
          Deprecated.  
 
Constructor Summary
SSHConnector(int port, com.cloudbees.jenkins.plugins.sshcredentials.SSHUser credentials, String jvmOptions, String javaPath, String prefixStartSlaveCmd, String suffixStartSlaveCmd)
           
SSHConnector(int port, com.cloudbees.jenkins.plugins.sshcredentials.SSHUser credentials, String username, String password, String privatekey, String jvmOptions, String javaPath, hudson.tools.JDKInstaller jdkInstaller, String prefixStartSlaveCmd, String suffixStartSlaveCmd)
           
SSHConnector(int port, String credentialsId, String jvmOptions, String javaPath, String prefixStartSlaveCmd, String suffixStartSlaveCmd)
           
SSHConnector(int port, String username, String password, String privatekey, String jvmOptions, String javaPath, hudson.tools.JDKInstaller jdkInstaller, String prefixStartSlaveCmd, String suffixStartSlaveCmd)
           
SSHConnector(int port, String username, String password, String privatekey, String jvmOptions, String javaPath, String prefixStartSlaveCmd, String suffixStartSlaveCmd)
           
 
Method Summary
 com.cloudbees.jenkins.plugins.sshcredentials.SSHUser getCredentials()
           
 String getCredentialsId()
           
 SSHLauncher launch(String host, hudson.model.TaskListener listener)
           
 
Methods inherited from class hudson.slaves.ComputerConnector
getDescriptor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

port

public final int port
Field port


username

@Deprecated
public transient String username
Deprecated. 
Field username


password

@Deprecated
public transient hudson.util.Secret password
Deprecated. 
Field password


privatekey

@Deprecated
public transient String privatekey
Deprecated. 
File path of the private key.


jvmOptions

public final String jvmOptions
Field jvmOptions.


javaPath

public final String javaPath
Field javaPath.


jdkInstaller

public final hudson.tools.JDKInstaller jdkInstaller
Field jdk


prefixStartSlaveCmd

public final String prefixStartSlaveCmd
Field prefixStartSlaveCmd.


suffixStartSlaveCmd

public final String suffixStartSlaveCmd
Field suffixStartSlaveCmd.

Constructor Detail

SSHConnector

@DataBoundConstructor
public SSHConnector(int port,
                                         String credentialsId,
                                         String jvmOptions,
                                         String javaPath,
                                         String prefixStartSlaveCmd,
                                         String suffixStartSlaveCmd)
See Also:
SSHLauncher.SSHLauncher(String, int, SSHUser, String, String, String, String)

SSHConnector

public SSHConnector(int port,
                    com.cloudbees.jenkins.plugins.sshcredentials.SSHUser credentials,
                    String jvmOptions,
                    String javaPath,
                    String prefixStartSlaveCmd,
                    String suffixStartSlaveCmd)
See Also:
SSHLauncher.SSHLauncher(String, int, SSHUser, String, String, String, String)

SSHConnector

public SSHConnector(int port,
                    String username,
                    String password,
                    String privatekey,
                    String jvmOptions,
                    String javaPath,
                    String prefixStartSlaveCmd,
                    String suffixStartSlaveCmd)
See Also:
SSHLauncher.SSHLauncher(String, int, String, String, String, String, String, String, String)

SSHConnector

public SSHConnector(int port,
                    String username,
                    String password,
                    String privatekey,
                    String jvmOptions,
                    String javaPath,
                    hudson.tools.JDKInstaller jdkInstaller,
                    String prefixStartSlaveCmd,
                    String suffixStartSlaveCmd)
See Also:
SSHLauncher.SSHLauncher(String, int, String,String,String, String, String, JDKInstaller, String, String)

SSHConnector

public SSHConnector(int port,
                    com.cloudbees.jenkins.plugins.sshcredentials.SSHUser credentials,
                    String username,
                    String password,
                    String privatekey,
                    String jvmOptions,
                    String javaPath,
                    hudson.tools.JDKInstaller jdkInstaller,
                    String prefixStartSlaveCmd,
                    String suffixStartSlaveCmd)
See Also:
SSHLauncher.SSHLauncher(String, int, SSHUser, String, String, JDKInstaller, String, String)
Method Detail

getCredentials

public com.cloudbees.jenkins.plugins.sshcredentials.SSHUser getCredentials()

getCredentialsId

public String getCredentialsId()

launch

public SSHLauncher launch(String host,
                          hudson.model.TaskListener listener)
                   throws IOException,
                          InterruptedException
Specified by:
launch in class hudson.slaves.ComputerConnector
Throws:
IOException
InterruptedException


Copyright © 2004-2013. All Rights Reserved.