KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jacorb > util > ValueHandler


1 package org.jacorb.util;
2
3 /**
4  * A static wrapper around classes in javax.rmi.
5  */

6 public class ValueHandler {
7
8     public static String JavaDoc getRMIRepositoryID (Class JavaDoc clz)
9     {
10         return javax.rmi.CORBA.Util.createValueHandler()
11             .getRMIRepositoryID (clz);
12     }
13
14     public static org.omg.SendingContext.RunTime JavaDoc getRunTimeCodeBase()
15     {
16         return javax.rmi.CORBA.Util.createValueHandler()
17             .getRunTimeCodeBase();
18     }
19
20     public static java.io.Serializable JavaDoc readValue
21         (org.omg.CORBA.portable.InputStream JavaDoc in,
22          int offset, Class JavaDoc clz, String JavaDoc repositoryID,
23          org.omg.SendingContext.RunTime JavaDoc sender)
24     {
25         return javax.rmi.CORBA.Util.createValueHandler()
26             .readValue (in, offset, clz, repositoryID, sender);
27     }
28
29     public static void writeValue (org.omg.CORBA.portable.OutputStream JavaDoc out,
30                                    java.io.Serializable JavaDoc value)
31     {
32         javax.rmi.CORBA.Util.createValueHandler()
33             .writeValue (out, value);
34     }
35
36     public static boolean isCustomMarshaled (Class JavaDoc clz)
37     {
38         return javax.rmi.CORBA.Util.createValueHandler()
39             .isCustomMarshaled (clz);
40     }
41
42     public static java.io.Serializable JavaDoc writeReplace (
43                                                     java.io.Serializable JavaDoc value)
44     {
45         return javax.rmi.CORBA.Util.createValueHandler()
46             .writeReplace (value);
47     }
48
49     /**
50      * From javax.rmi.CORBA.Util.
51      */

52     public static Class JavaDoc loadClass (String JavaDoc className,
53                                    String JavaDoc remoteCodebase,
54                                    ClassLoader JavaDoc loader)
55         throws ClassNotFoundException JavaDoc
56     {
57         return javax.rmi.CORBA.Util.loadClass (className,
58                                                remoteCodebase,
59                                                loader);
60     }
61
62     /**
63      * From javax.rmi.CORBA.Util.
64      */

65     public static String JavaDoc getCodebase (Class JavaDoc clz)
66     {
67         return javax.rmi.CORBA.Util.getCodebase (clz);
68     }
69
70     /**
71      * From javax.rmi.PortableRemoteObject.
72      */

73     public static Object JavaDoc portableRemoteObject_narrow (Object JavaDoc narrowFrom,
74                                                       Class JavaDoc narrowTo)
75         throws ClassCastException JavaDoc
76     {
77         return javax.rmi.PortableRemoteObject.narrow (narrowFrom, narrowTo);
78     }
79
80 }
81
Popular Tags