|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IProcessUtilityService
Provides utilities for dealing with starting and stopping system processes.
Field Summary | |
---|---|
static java.lang.String |
SERVICE_NAME
service name of this interface for the bundle activator (com.esf.util.proc.service) |
Method Summary | |
---|---|
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. |
Field Detail |
---|
static final java.lang.String SERVICE_NAME
Method Detail |
---|
int start(java.lang.String command) throws java.lang.Exception
command
- the command to execute
java.lang.Exception
- if the execution failsProcessStats startWithStats(java.lang.String command) throws java.lang.Exception
command
- the command to execute
java.lang.Exception
- if the execution failsint getPid(java.lang.String command) throws java.lang.Exception
command
- the command to get the PID of
java.lang.Exception
- if the pid search failsboolean kill(int pid)
pid
- the PID of the process to kill
boolean killAll(java.lang.String command)
command
- the command to kill from the process list
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |