add findSingleProcess(String) helper

This commit is contained in:
Doug MacEachern 2006-08-24 22:48:50 +00:00
parent a280882ccc
commit 5c33239e82
1 changed files with 14 additions and 0 deletions

View File

@ -36,6 +36,20 @@ public class ProcessFinder {
this.proxy.getPid();
}
public long findSingleProcess(String query)
throws SigarException, SigarNotImplementedException {
try {
ProcessQuery processQuery =
ProcessQueryFactory.getInstance(query);
return findSingleProcess(processQuery);
} catch (MalformedQueryException e) {
throw new SigarException(e.getMessage());
} catch (QueryLoadException e) {
throw new SigarException(e.getMessage());
}
}
public long findSingleProcess(ProcessQuery query)
throws SigarException, SigarNotImplementedException,
MalformedQueryException {