public class JSchProcess extends java.lang.Object implements IRemoteProcessControlService, IRemoteProcessSignalService, IRemoteProcessTerminalService
| Modifier and Type | Class and Description |
|---|---|
static class |
JSchProcess.Factory |
class |
JSchProcess.NullInputStream |
| Constructor and Description |
|---|
JSchProcess(IRemoteProcess process) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Terminate the process
|
int |
exitValue()
Returns the exit value for the process
|
java.io.InputStream |
getErrorStream()
Gets the error output stream of the process
|
java.io.InputStream |
getInputStream()
Gets an InputStream which can be used to read the standard output stream of the process
|
java.io.OutputStream |
getOutputStream()
Gets an output stream which can be used to write to the standard input stream of the process
|
IRemoteProcess |
getRemoteProcess() |
boolean |
isCompleted()
Check if the remote process has completed
|
void |
sendSignal(int signal)
Send a signal to the remote process.
|
void |
setTerminalSize(int cols,
int rows,
int width,
int height)
Change the terminal window dimension interactively.
|
int |
waitFor()
Wait until the process has terminated
|
public JSchProcess(IRemoteProcess process)
public void destroy()
IRemoteProcessControlServicedestroy in interface IRemoteProcessControlServicepublic int exitValue()
IRemoteProcessControlServiceexitValue in interface IRemoteProcessControlServicepublic java.io.InputStream getErrorStream()
IRemoteProcessControlServicegetErrorStream in interface IRemoteProcessControlServicepublic java.io.InputStream getInputStream()
IRemoteProcessControlServicegetInputStream in interface IRemoteProcessControlServicepublic java.io.OutputStream getOutputStream()
IRemoteProcessControlServicegetOutputStream in interface IRemoteProcessControlServicepublic int waitFor()
throws java.lang.InterruptedException
IRemoteProcessControlServicewaitFor in interface IRemoteProcessControlServicejava.lang.InterruptedException - if the current thread is
interrupted by another thread while it is waitingpublic boolean isCompleted()
IRemoteProcessControlServiceisCompleted in interface IRemoteProcessControlServicepublic IRemoteProcess getRemoteProcess()
getRemoteProcess in interface IRemoteProcess.Servicepublic void setTerminalSize(int cols,
int rows,
int width,
int height)
IRemoteProcessTerminalServicesetTerminalSize in interface IRemoteProcessTerminalServicecols - terminal width in charactersrows - terminal height in characterswidth - terminal width in pixelsheight - terminal height in pixelspublic void sendSignal(int signal)
throws RemoteConnectionException
IRemoteProcessSignalServicesendSignal in interface IRemoteProcessSignalServicesignal - signal to send.RemoteConnectionException - if the underlying connection fails