public interface IProcessUtilityService
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SERVICE_NAME
service name of this interface for the bundle activator
(com.esf.util.proc.service)
|
Modifier and Type | Method and Description |
---|---|
int |
getPid(java.lang.String command)
gets the PID of a process running in the process list
|
boolean |
kill(int pid)
kills a process running in the process list based on its PID
|
boolean |
killAll(java.lang.String command)
kills all processes with the name specified by the String command
|
int |
start(java.lang.String command)
starts a process using the Runtime and Process classes
|
ProcessStats |
startWithStats(java.lang.String command)
starts a process using the Runtime and Process classes and returns a ProcessStats
object that contains the return code, and input/output streams.
|
static final java.lang.String SERVICE_NAME
int start(java.lang.String command) throws java.lang.Exception
command
- the command to executejava.lang.Exception
- if the execution failsProcessStats startWithStats(java.lang.String command) throws java.lang.Exception
command
- the command to executejava.lang.Exception
- if the execution failsint getPid(java.lang.String command) throws java.lang.Exception
command
- the command to get the PID ofjava.lang.Exception
- if the pid search failsboolean kill(int pid)
pid
- the PID of the process to killboolean killAll(java.lang.String command)
command
- the command to kill from the process listCopyright © 2009 Eurotech Inc. All rights reserved.