SigarProxy must implement InvocationHandler

This commit is contained in:
Doug MacEachern 2009-04-29 14:55:47 -07:00
parent ad8325e616
commit f6e85761d2
1 changed files with 7 additions and 0 deletions

View File

@ -18,13 +18,16 @@
package org.hyperic.sigar.jmx;
import java.lang.reflect.InvocationHandler;
import java.util.Map;
import java.util.StringTokenizer;
import org.hyperic.sigar.Sigar;
import org.hyperic.sigar.SigarException;
import org.hyperic.sigar.SigarInvoker;
import org.hyperic.sigar.SigarNotImplementedException;
import org.hyperic.sigar.SigarProxy;
import org.hyperic.sigar.SigarProxyCache;
import org.hyperic.sigar.util.ReferenceMap;
/**
@ -61,6 +64,10 @@ public class SigarInvokerJMX extends SigarInvoker {
SigarInvokerJMX invoker;
if (!(proxy instanceof InvocationHandler) && (proxy instanceof Sigar)) {
proxy = SigarProxyCache.newInstance((Sigar)proxy);
}
int ix = name.indexOf(":");
if (ix > 0) {
//skip domain name