01: package org.jacorb.util;
02:
03: /**
04: * A static wrapper around classes in javax.rmi.
05: */
06: public class ValueHandler {
07:
08: public static String getRMIRepositoryID(Class clz) {
09: return javax.rmi.CORBA.Util.createValueHandler()
10: .getRMIRepositoryID(clz);
11: }
12:
13: public static org.omg.SendingContext.RunTime getRunTimeCodeBase() {
14: return javax.rmi.CORBA.Util.createValueHandler()
15: .getRunTimeCodeBase();
16: }
17:
18: public static java.io.Serializable readValue(
19: org.omg.CORBA.portable.InputStream in, int offset,
20: Class clz, String repositoryID,
21: org.omg.SendingContext.RunTime sender) {
22: return javax.rmi.CORBA.Util.createValueHandler().readValue(in,
23: offset, clz, repositoryID, sender);
24: }
25:
26: public static void writeValue(
27: org.omg.CORBA.portable.OutputStream out,
28: java.io.Serializable value) {
29: javax.rmi.CORBA.Util.createValueHandler()
30: .writeValue(out, value);
31: }
32:
33: public static boolean isCustomMarshaled(Class clz) {
34: return javax.rmi.CORBA.Util.createValueHandler()
35: .isCustomMarshaled(clz);
36: }
37:
38: public static java.io.Serializable writeReplace(
39: java.io.Serializable value) {
40: return javax.rmi.CORBA.Util.createValueHandler().writeReplace(
41: value);
42: }
43:
44: /**
45: * From javax.rmi.CORBA.Util.
46: */
47: public static Class loadClass(String className,
48: String remoteCodebase, ClassLoader loader)
49: throws ClassNotFoundException {
50: return javax.rmi.CORBA.Util.loadClass(className,
51: remoteCodebase, loader);
52: }
53:
54: /**
55: * From javax.rmi.CORBA.Util.
56: */
57: public static String getCodebase(Class clz) {
58: return javax.rmi.CORBA.Util.getCodebase(clz);
59: }
60:
61: /**
62: * From javax.rmi.PortableRemoteObject.
63: */
64: public static Object portableRemoteObject_narrow(Object narrowFrom,
65: Class narrowTo) throws ClassCastException {
66: return javax.rmi.PortableRemoteObject.narrow(narrowFrom,
67: narrowTo);
68: }
69:
70: }
|