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