Class SshSpawn2
- java.lang.Object
-
- com.santaba.agent.groovyapi.expect.expectj.AbstractSpawnable
-
- com.santaba.agent.groovyapi.expect.expectj.SshSpawn2
-
- All Implemented Interfaces:
Spawnable
public class SshSpawn2 extends AbstractSpawnable implements Spawnable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.santaba.agent.groovyapi.expect.expectj.Spawnable
Spawnable.CloseListener
-
-
Constructor Summary
Constructors Constructor Description SshSpawn2(java.lang.String remoteHostName, int remotePort, java.lang.String username, java.lang.String password)Construct a new SSH spawn.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetExitValue()Get exit valuejava.io.InputStreamgetStderr()Get the standard error input streamjava.io.OutputStreamgetStdin()Get the standard in output streamjava.io.InputStreamgetStdout()Get the standard out input streambooleanisClosed()Whether if ssh spawn closedvoidstart()Start ssh spawnvoidstop()Stop the ssh spawn-
Methods inherited from class com.santaba.agent.groovyapi.expect.expectj.AbstractSpawnable
onClose, setCloseListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.santaba.agent.groovyapi.expect.expectj.Spawnable
setCloseListener
-
-
-
-
Constructor Detail
-
SshSpawn2
public SshSpawn2(java.lang.String remoteHostName, int remotePort, java.lang.String username, java.lang.String password)Construct a new SSH spawn.- Parameters:
remoteHostName- The remote host to connect to.remotePort- The remote port to connect to.username- The user name with which to authenticatepassword- The password with which to authenticate
-
-
Method Detail
-
start
public void start() throws java.io.IOExceptionStart ssh spawn
-
getStdout
public java.io.InputStream getStdout()
Get the standard out input stream
-
getStdin
public java.io.OutputStream getStdin()
Get the standard in output stream
-
getStderr
public java.io.InputStream getStderr()
Get the standard error input stream
-
isClosed
public boolean isClosed()
Whether if ssh spawn closed
-
getExitValue
public int getExitValue()
Get exit value- Specified by:
getExitValuein interfaceSpawnable- Returns:
- Exit value
- See Also:
Spawnable.isClosed(),System.exit(int)
-
-