1 8 9 package mx4j.remote; 10 11 import java.lang.reflect.InvocationHandler ; 12 import java.lang.reflect.InvocationTargetException ; 13 import java.lang.reflect.Method ; 14 import javax.management.MBeanServerConnection ; 15 16 19 public class ClientProxy implements InvocationHandler 20 { 21 private final MBeanServerConnection target; 22 23 protected ClientProxy(MBeanServerConnection target) 24 { 25 this.target = target; 26 } 27 28 public Object invoke(Object proxy, Method method, Object [] args) throws Throwable 29 { 30 try 31 { 32 return method.invoke(target, args); 33 } 34 catch (InvocationTargetException x) 35 { 36 throw x.getTargetException(); 37 } 38 } 39 } 40 | Popular Tags |