ProcessQueryFactory changes
This commit is contained in:
parent
50a7f2dbe3
commit
a8f28f2ee0
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue