|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecthudson.model.AbstractDescribableImpl<hudson.slaves.ComputerLauncher>
hudson.slaves.ComputerLauncher
hudson.plugins.sshslaves.SSHLauncher
public class SSHLauncher
A computer launcher that tries to start a linux slave by opening an SSH connection and trying to find java.
| Nested Class Summary | |
|---|---|
static class |
SSHLauncher.DefaultJavaProvider
|
static class |
SSHLauncher.DescriptorImpl
|
| Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
|---|
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson |
| Field Summary |
|---|
| Fields inherited from class hudson.slaves.ComputerLauncher |
|---|
LIST |
| Constructor Summary | |
|---|---|
SSHLauncher(String host,
int port,
String username,
String password,
String privatekey,
String jvmOptions,
String javaPath)
Constructor SSHLauncher creates a new SSHLauncher instance. |
|
| Method Summary | |
|---|---|
void |
afterDisconnect(hudson.slaves.SlaveComputer slaveComputer,
hudson.model.TaskListener listener)
|
protected String |
checkJavaVersion(PrintStream logger,
String javaCommand,
BufferedReader r,
StringWriter output)
Given the output of "java -version" in r, determine if this
version of Java is supported. |
com.trilead.ssh2.Connection |
getConnection()
|
String |
getHost()
Getter for property 'host'. |
String |
getJavaPath()
Gets the optional java command to use to launch the slave JVM. |
String |
getJvmOptions()
Gets the JVM Options used to launch the slave JVM. |
String |
getPassword()
Getter for property 'password'. |
int |
getPort()
Getter for property 'port'. |
String |
getPrivatekey()
Getter for property 'privatekey'. |
protected String |
getTimestamp()
Gets the formatted current time stamp. |
String |
getUsername()
Getter for property 'username'. |
boolean |
isLaunchSupported()
|
void |
launch(hudson.slaves.SlaveComputer computer,
hudson.model.TaskListener listener)
|
protected void |
openConnection(hudson.model.TaskListener listener)
|
protected void |
reportEnvironment(hudson.model.TaskListener listener)
|
protected String |
resolveJava(hudson.slaves.SlaveComputer computer,
hudson.model.TaskListener listener)
Finds local Java, and if none exist, install one. |
| Methods inherited from class hudson.slaves.ComputerLauncher |
|---|
afterDisconnect, beforeDisconnect, beforeDisconnect, launch |
| Methods inherited from class hudson.model.AbstractDescribableImpl |
|---|
getDescriptor |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
@DataBoundConstructor
public SSHLauncher(String host,
int port,
String username,
String password,
String privatekey,
String jvmOptions,
String javaPath)
host - The host to connect to.port - The port to connect on.username - The username to connect as.password - The password to connect with.privatekey - The ssh privatekey to connect with.jvmOptions - jvm options.javaPath - optional path to java.| Method Detail |
|---|
public boolean isLaunchSupported()
isLaunchSupported in class hudson.slaves.ComputerLauncherpublic String getJvmOptions()
public String getJavaPath()
protected String getTimestamp()
public void launch(hudson.slaves.SlaveComputer computer,
hudson.model.TaskListener listener)
throws InterruptedException
launch in class hudson.slaves.ComputerLauncherInterruptedException
protected String resolveJava(hudson.slaves.SlaveComputer computer,
hudson.model.TaskListener listener)
throws InterruptedException,
hudson.util.IOException2
computer - slave.listener - task listener.
InterruptedException - if any.
hudson.util.IOException2 - if any.
protected void reportEnvironment(hudson.model.TaskListener listener)
throws IOException,
InterruptedException
IOException
InterruptedException
protected String checkJavaVersion(PrintStream logger,
String javaCommand,
BufferedReader r,
StringWriter output)
throws IOException
r, determine if this
version of Java is supported. This method has default visibility for testing.
logger - where to log the outputjavaCommand - the command executed, used for loggingr - the output of "java -version"output - copy the data from r into this output buffer
IOException - if any.
protected void openConnection(hudson.model.TaskListener listener)
throws IOException
IOException
public void afterDisconnect(hudson.slaves.SlaveComputer slaveComputer,
hudson.model.TaskListener listener)
afterDisconnect in class hudson.slaves.ComputerLauncherpublic String getHost()
public int getPort()
public String getUsername()
public String getPassword()
public String getPrivatekey()
public com.trilead.ssh2.Connection getConnection()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||