add contructor that takes already open sigar
This commit is contained in:
parent
8864012c94
commit
0d58f9f281
|
@ -37,7 +37,11 @@ public class SigarProcess implements SigarProcessMBean {
|
||||||
private SigarProxy sigar;
|
private SigarProxy sigar;
|
||||||
|
|
||||||
public SigarProcess() {
|
public SigarProcess() {
|
||||||
this.sigarImpl = new Sigar();
|
this(new Sigar());
|
||||||
|
}
|
||||||
|
|
||||||
|
public SigarProcess(Sigar sigar) {
|
||||||
|
this.sigarImpl = sigar;
|
||||||
this.sigar = SigarProxyCache.newInstance(sigarImpl);
|
this.sigar = SigarProxyCache.newInstance(sigarImpl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue