KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > jmx > remote > internal > ProxyRef


1 /*
2  * @(#)ProxyRef.java 1.2 04/01/26
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

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