From 0d58f9f28165d27efacb4072f5e7e39f2d25202b Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Thu, 18 Jan 2007 22:30:46 +0000 Subject: [PATCH] add contructor that takes already open sigar --- bindings/java/src/org/hyperic/sigar/jmx/SigarProcess.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bindings/java/src/org/hyperic/sigar/jmx/SigarProcess.java b/bindings/java/src/org/hyperic/sigar/jmx/SigarProcess.java index f3bcde25..c2bcc2de 100644 --- a/bindings/java/src/org/hyperic/sigar/jmx/SigarProcess.java +++ b/bindings/java/src/org/hyperic/sigar/jmx/SigarProcess.java @@ -37,7 +37,11 @@ public class SigarProcess implements SigarProcessMBean { private SigarProxy sigar; public SigarProcess() { - this.sigarImpl = new Sigar(); + this(new Sigar()); + } + + public SigarProcess(Sigar sigar) { + this.sigarImpl = sigar; this.sigar = SigarProxyCache.newInstance(sigarImpl); }