diff --git a/bindings/java/src/org/hyperic/sigar/ptql/ProcessFinder.java b/bindings/java/src/org/hyperic/sigar/ptql/ProcessFinder.java index 0f3f088d..47ce411b 100644 --- a/bindings/java/src/org/hyperic/sigar/ptql/ProcessFinder.java +++ b/bindings/java/src/org/hyperic/sigar/ptql/ProcessFinder.java @@ -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 {