Package org.apache.karaf.jpm.impl
Class ProcessImpl
- java.lang.Object
-
- org.apache.karaf.jpm.impl.ProcessImpl
-
- All Implemented Interfaces:
Serializable,Process
public class ProcessImpl extends Object implements Process
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ProcessImpl(int pid)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Processattach(int pid)static Processcreate(File dir, String command)voiddestroy()Destroy the process.intexitValue()intgetPid()Retrieves the PID of the processbooleanisRunning()Check if this process is still runningintwaitFor()
-
-
-
Method Detail
-
getPid
public int getPid()
Description copied from interface:ProcessRetrieves the PID of the process
-
isRunning
public boolean isRunning() throws IOExceptionDescription copied from interface:ProcessCheck if this process is still running- Specified by:
isRunningin interfaceProcess- Returns:
trueif the process is running- Throws:
IOException- if an error occurs
-
destroy
public void destroy() throws IOExceptionDescription copied from interface:ProcessDestroy the process.- Specified by:
destroyin interfaceProcess- Throws:
IOException- If an error occurs.
-
waitFor
public int waitFor() throws InterruptedException- Throws:
InterruptedException
-
exitValue
public int exitValue()
-
create
public static Process create(File dir, String command) throws IOException
- Throws:
IOException
-
attach
public static Process attach(int pid) throws IOException
- Throws:
IOException
-
-