KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > omg > mof > Reflective > RefBaseObjectPOA


1 package org.omg.mof.Reflective;
2
3
4 /**
5 * org/omg/mof/Reflective/RefBaseObjectPOA.java .
6 * Generated by the IDL-to-Java compiler (portable), version "3.1"
7 * from Reflective.idl
8 * lundi 17 mars 2003 15 h 00 CET
9 */

10
11 public abstract class RefBaseObjectPOA extends org.omg.PortableServer.Servant JavaDoc
12  implements org.omg.mof.Reflective.RefBaseObjectOperations, org.omg.CORBA.portable.InvokeHandler JavaDoc
13 {
14
15   // Constructors
16

17   private static java.util.Hashtable JavaDoc _methods = new java.util.Hashtable JavaDoc ();
18   static
19   {
20     _methods.put ("ref_mof_id", new java.lang.Integer JavaDoc (0));
21     _methods.put ("ref_meta_object", new java.lang.Integer JavaDoc (1));
22     _methods.put ("ref_itself", new java.lang.Integer JavaDoc (2));
23     _methods.put ("ref_immediate_package", new java.lang.Integer JavaDoc (3));
24     _methods.put ("ref_outermost_package", new java.lang.Integer JavaDoc (4));
25     _methods.put ("ref_delete", new java.lang.Integer JavaDoc (5));
26   }
27
28   public org.omg.CORBA.portable.OutputStream JavaDoc _invoke (String JavaDoc $method,
29                                 org.omg.CORBA.portable.InputStream JavaDoc in,
30                                 org.omg.CORBA.portable.ResponseHandler JavaDoc $rh)
31   {
32     org.omg.CORBA.portable.OutputStream JavaDoc out = null;
33     java.lang.Integer JavaDoc __method = (java.lang.Integer JavaDoc)_methods.get ($method);
34     if (__method == null)
35       throw new org.omg.CORBA.BAD_OPERATION JavaDoc (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
36
37     switch (__method.intValue ())
38     {
39        case 0: // org/omg/mof/Reflective/RefBaseObject/ref_mof_id
40
{
41          String JavaDoc $result = null;
42          $result = this.ref_mof_id ();
43          out = $rh.createReply();
44          out.write_string ($result);
45          break;
46        }
47
48        case 1: // org/omg/mof/Reflective/RefBaseObject/ref_meta_object
49
{
50          org.omg.mof.Reflective.RefObject $result = null;
51          $result = this.ref_meta_object ();
52          out = $rh.createReply();
53          org.omg.mof.Reflective.RefObjectHelper.write (out, $result);
54          break;
55        }
56
57        case 2: // org/omg/mof/Reflective/RefBaseObject/ref_itself
58
{
59          org.omg.mof.Reflective.RefBaseObject other_object = org.omg.mof.Reflective.RefBaseObjectHelper.read (in);
60          boolean $result = false;
61          $result = this.ref_itself (other_object);
62          out = $rh.createReply();
63          out.write_boolean ($result);
64          break;
65        }
66
67        case 3: // org/omg/mof/Reflective/RefBaseObject/ref_immediate_package
68
{
69          org.omg.mof.Reflective._RefPackage $result = null;
70          $result = this.ref_immediate_package ();
71          out = $rh.createReply();
72          org.omg.mof.Reflective._RefPackageHelper.write (out, $result);
73          break;
74        }
75
76        case 4: // org/omg/mof/Reflective/RefBaseObject/ref_outermost_package
77
{
78          org.omg.mof.Reflective._RefPackage $result = null;
79          $result = this.ref_outermost_package ();
80          out = $rh.createReply();
81          org.omg.mof.Reflective._RefPackageHelper.write (out, $result);
82          break;
83        }
84
85        case 5: // org/omg/mof/Reflective/RefBaseObject/ref_delete
86
{
87          try {
88            this.ref_delete ();
89            out = $rh.createReply();
90          } catch (org.omg.mof.Reflective.MofError $ex) {
91            out = $rh.createExceptionReply ();
92            org.omg.mof.Reflective.MofErrorHelper.write (out, $ex);
93          }
94          break;
95        }
96
97        default:
98          throw new org.omg.CORBA.BAD_OPERATION JavaDoc (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
99     }
100
101     return out;
102   } // _invoke
103

104   // Type-specific CORBA::Object operations
105
private static String JavaDoc[] __ids = {
106     "IDL:org/omg/mof/Reflective/RefBaseObject:1.0"};
107
108   public String JavaDoc[] _all_interfaces (org.omg.PortableServer.POA JavaDoc poa, byte[] objectId)
109   {
110     return (String JavaDoc[])__ids.clone ();
111   }
112
113   public RefBaseObject _this()
114   {
115     return RefBaseObjectHelper.narrow(
116     super._this_object());
117   }
118
119   public RefBaseObject _this(org.omg.CORBA.ORB JavaDoc orb)
120   {
121     return RefBaseObjectHelper.narrow(
122     super._this_object(orb));
123   }
124
125
126 } // class RefBaseObjectPOA
127
Popular Tags