public class RemoteProcess extends java.lang.Process implements IRemoteProcess
IRemoteProcess.Service
Constructor and Description |
---|
RemoteProcess(IRemoteConnection connection,
IRemoteProcessBuilder builder) |
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
Note: some implementations (e.g.
|
java.io.InputStream |
getInputStream()
Gets an InputStream which can be used to read the standard output stream of the process
Note: some implementations (e.g.
|
java.io.OutputStream |
getOutputStream()
Gets an output stream which can be used to write to the standard input stream of the process
|
IRemoteProcessBuilder |
getProcessBuilder()
Get the process builder used to create this process
|
IRemoteConnection |
getRemoteConnection()
Get the connection that is used by this process
|
<T extends IRemoteProcess.Service> |
getService(java.lang.Class<T> service)
Get the service for this remote process that implements the given interface.
|
<T extends IRemoteProcess.Service> |
hasService(java.lang.Class<T> service)
Does this remote process support the given service.
|
boolean |
isCompleted()
Check if the remote process has completed.
|
int |
waitFor()
Wait until the process has terminated
Note: some implementations (e.g.
|
public RemoteProcess(IRemoteConnection connection, IRemoteProcessBuilder builder)
public void destroy()
IRemoteProcess
destroy
in interface IRemoteProcess
destroy
in class java.lang.Process
public int exitValue()
IRemoteProcess
exitValue
in interface IRemoteProcess
exitValue
in class java.lang.Process
public java.io.InputStream getErrorStream()
IRemoteProcess
getErrorStream
in interface IRemoteProcess
getErrorStream
in class java.lang.Process
public java.io.InputStream getInputStream()
IRemoteProcess
getInputStream
in interface IRemoteProcess
getInputStream
in class java.lang.Process
public java.io.OutputStream getOutputStream()
IRemoteProcess
getOutputStream
in interface IRemoteProcess
getOutputStream
in class java.lang.Process
public <T extends IRemoteProcess.Service> T getService(java.lang.Class<T> service)
IRemoteProcess
getService
in interface IRemoteProcess
service
- the interface the required service must implementspublic <T extends IRemoteProcess.Service> boolean hasService(java.lang.Class<T> service)
IRemoteProcess
hasService
in interface IRemoteProcess
service
- The service to be testedpublic int waitFor() throws java.lang.InterruptedException
IRemoteProcess
waitFor
in interface IRemoteProcess
waitFor
in class java.lang.Process
java.lang.InterruptedException
- if the current thread is
interrupted by another thread while it is waitingpublic boolean isCompleted()
IRemoteProcess
isCompleted
in interface IRemoteProcess
public IRemoteConnection getRemoteConnection()
IRemoteProcess
getRemoteConnection
in interface IRemoteProcess
public IRemoteProcessBuilder getProcessBuilder()
IRemoteProcess
getProcessBuilder
in interface IRemoteProcess