ProcessQueryFactory changes

This commit is contained in:
Doug MacEachern 2007-04-23 00:49:36 +00:00
parent 50a7f2dbe3
commit a8f28f2ee0
1 changed files with 4 additions and 4 deletions

View File

@ -26,6 +26,7 @@ import org.hyperic.sigar.SigarProxyCache;
public class ProcessFinder { public class ProcessFinder {
private Sigar sigar; private Sigar sigar;
private ProcessQueryFactory qf;
/** /**
* @deprecated * @deprecated
@ -36,14 +37,13 @@ public class ProcessFinder {
public ProcessFinder(Sigar sigar) { public ProcessFinder(Sigar sigar) {
this.sigar = sigar; this.sigar = sigar;
this.qf = ProcessQueryFactory.getInstance();
} }
public long findSingleProcess(String query) public long findSingleProcess(String query)
throws SigarException { throws SigarException {
ProcessQuery processQuery = return findSingleProcess(this.qf.getQuery(query));
ProcessQueryFactory.getInstance(query);
return findSingleProcess(processQuery);
} }
public long findSingleProcess(ProcessQuery query) public long findSingleProcess(ProcessQuery query)
@ -67,7 +67,7 @@ public class ProcessFinder {
public long[] find(String query) public long[] find(String query)
throws SigarException { throws SigarException {
return find(ProcessQueryFactory.getInstance(query)); return find(this.qf.getQuery(query));
} }
public long[] find(ProcessQuery query) public long[] find(ProcessQuery query)