|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 |
Field Detail |
public static final java.lang.String SERVICE_NAME
Method Detail |
public int start(java.lang.String command) throws java.lang.Exception
command
- the command to execute
java.lang.Exception
- if the execution failspublic int getPid(java.lang.String command) throws java.lang.Exception
command
- the command to get the PID of
java.lang.Exception
- if the pid search failspublic boolean kill(int pid)
pid
- the PID of the process to kill
public 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 |