public interface SSHProcess
SSHSession.execute(String...) method.| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Attempts to stop the remote process by closing ssh channel.
|
int |
exitValue()
Returns the exit code of the remote process if it was completed.
|
InputStream |
getErrorStream()
Returns an
InputStream for reading from the remote process stderr. |
InputStream |
getInputStream()
Returns an
InputStream for reading from the remote process stdout. |
OutputStream |
getOutputStream()
Returns an
OutputStream for writing to the remote process stdin. |
int |
waitFor()
Blocks for the remote process to finish.
|
int |
waitFor(long timeout,
TimeUnit unit)
Blocks for the remote process to finish.
|
OutputStream getOutputStream() throws IOException
OutputStream for writing to the remote process stdin.OutputStreamIOException - if failed to open the streamInputStream getInputStream() throws IOException
InputStream for reading from the remote process stdout.InputStreamIOException - if failed to open the streamInputStream getErrorStream() throws IOException
InputStream for reading from the remote process stderr.InputStreamIOException - if failed to open the streamint waitFor()
throws InterruptedException
InterruptedException - if this thread is interrupted while waitingint waitFor(long timeout,
TimeUnit unit)
throws TimeoutException,
InterruptedException
timeout - the maximum time to waitunit - the TimeUnit for the timeoutTimeoutException - if the process is not yet terminated after the given timeoutInterruptedException - if this thread is interrupted while waitingint exitValue()
throws IllegalThreadStateException
IllegalThreadStateException - if the process is not yet terminatedvoid destroy()
Copyright © 2018 Cask Data, Inc. Licensed under the Apache License, Version 2.0.