public class ProcessImpl extends Object implements Process
| Constructor and Description |
|---|
ProcessImpl(int pid) |
| Modifier and Type | Method and Description |
|---|---|
static Process |
attach(int pid) |
static Process |
create(File dir,
String command) |
void |
destroy()
Destroy the process.
|
int |
exitValue() |
int |
getPid()
Retrieves the PID of the process
|
boolean |
isRunning()
Check if this process is still running
|
int |
waitFor() |
public int getPid()
Processpublic boolean isRunning()
throws IOException
ProcessisRunning in interface Processtrue if the process is runningIOException - if an error occurspublic void destroy()
throws IOException
Processdestroy in interface ProcessIOException - If an error occurs.public int waitFor()
throws InterruptedException
InterruptedExceptionpublic int exitValue()
public static Process create(File dir, String command) throws IOException
IOExceptionpublic static Process attach(int pid) throws IOException
IOExceptionCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.