01: package org.omg.PortableServer;
02:
03: public class ServantLocatorHelper {
04: public ServantLocatorHelper() {
05: }
06:
07: public static void insert(org.omg.CORBA.Any any,
08: org.omg.PortableServer.ServantLocator s) {
09: any.insert_Object(s);
10: }
11:
12: public static org.omg.PortableServer.ServantLocator extract(
13: org.omg.CORBA.Any any) {
14: return narrow(any.extract_Object());
15: }
16:
17: public static org.omg.CORBA.TypeCode type() {
18: return org.omg.CORBA.ORB.init().create_interface_tc(
19: "IDL:omg.org/PortableServer/ServantLocator:1.0",
20: "ServantLocator");
21: }
22:
23: public static String id() {
24: return "IDL:omg.org/PortableServer/ServantLocator:1.0";
25: }
26:
27: public static ServantLocator read(
28: org.omg.CORBA.portable.InputStream in) {
29: return narrow(in.read_Object());
30: }
31:
32: public static void write(org.omg.CORBA.portable.OutputStream _out,
33: org.omg.PortableServer.ServantLocator s) {
34: _out.write_Object(s);
35: }
36:
37: public static org.omg.PortableServer.ServantLocator narrow(
38: org.omg.CORBA.Object obj) {
39: try {
40: return (org.omg.PortableServer.ServantLocator) obj;
41: } catch (ClassCastException c) {
42: if (obj
43: ._is_a("IDL:omg.org/PortableServer/ServantLocator:1.0")) {
44: org.omg.PortableServer._ServantLocatorStub stub;
45: stub = new org.omg.PortableServer._ServantLocatorStub();
46: stub
47: ._set_delegate(((org.omg.CORBA.portable.ObjectImpl) obj)
48: ._get_delegate());
49: return stub;
50: }
51: }
52: return null;
53: }
54:
55: public void write_Object(org.omg.CORBA.portable.OutputStream _out,
56: java.lang.Object obj) {
57: throw new RuntimeException(" not implemented");
58: }
59:
60: public java.lang.Object read_Object(
61: org.omg.CORBA.portable.InputStream in) {
62: throw new RuntimeException(" not implemented");
63: }
64:
65: public String get_id() {
66: return id();
67: }
68:
69: public org.omg.CORBA.TypeCode get_type() {
70: return type();
71: }
72: }
|