1 7 8 package com.sun.jmx.remote.internal; 9 10 import java.io.IOException ; 11 import java.io.ObjectInput ; 12 import java.io.ObjectOutput ; 13 import java.lang.reflect.Method ; 14 import java.rmi.Remote ; 15 import java.rmi.RemoteException ; 16 import java.rmi.server.Operation ; 17 import java.rmi.server.RemoteCall ; 18 import java.rmi.server.RemoteObject ; 19 import java.rmi.server.RemoteRef ; 20 21 public class ProxyRef implements RemoteRef { 22 public ProxyRef(RemoteRef ref) { 23 this.ref = ref; 24 } 25 26 public void readExternal(ObjectInput in) 27 throws IOException , ClassNotFoundException { 28 ref.readExternal(in); 29 } 30 31 public void writeExternal(ObjectOutput out) throws IOException { 32 ref.writeExternal(out); 33 } 34 35 public void invoke(RemoteCall call) throws Exception { 36 ref.invoke(call); 37 } 38 39 public Object invoke(Remote obj, Method method, Object [] params, 40 long opnum) throws Exception { 41 return ref.invoke(obj, method, params, opnum); 42 } 43 44 public void done(RemoteCall call) throws RemoteException { 45 ref.done(call); 46 } 47 48 public String getRefClass(ObjectOutput out) { 49 return ref.getRefClass(out); 50 } 51 52 public RemoteCall newCall(RemoteObject obj, Operation [] op, int opnum, 53 long hash) throws RemoteException { 54 return ref.newCall(obj, op, opnum, hash); 55 } 56 57 public boolean remoteEquals(RemoteRef obj) { 58 return ref.remoteEquals(obj); 59 } 60 61 public int remoteHashCode() { 62 return ref.remoteHashCode(); 63 } 64 65 public String remoteToString() { 66 return ref.remoteToString(); 67 } 68 69 protected RemoteRef ref; 70 } 71 72 | Popular Tags |