KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.omg.mof.Reflective;
2
3
4 /**
5 * org/omg/mof/Reflective/RefObjectPOA.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
12 // end of RefBaseObject interface
13
public abstract class RefObjectPOA extends org.omg.PortableServer.Servant JavaDoc
14  implements org.omg.mof.Reflective.RefObjectOperations, org.omg.CORBA.portable.InvokeHandler JavaDoc
15 {
16
17   // Constructors
18

19   private static java.util.Hashtable JavaDoc _methods = new java.util.Hashtable JavaDoc ();
20   static
21   {
22     _methods.put ("ref_is_instance_of", new java.lang.Integer JavaDoc (0));
23     _methods.put ("ref_create_instance", new java.lang.Integer JavaDoc (1));
24     _methods.put ("ref_all_objects", new java.lang.Integer JavaDoc (2));
25     _methods.put ("ref_set_value", new java.lang.Integer JavaDoc (3));
26     _methods.put ("ref_value", new java.lang.Integer JavaDoc (4));
27     _methods.put ("ref_unset_value", new java.lang.Integer JavaDoc (5));
28     _methods.put ("ref_add_value", new java.lang.Integer JavaDoc (6));
29     _methods.put ("ref_add_value_before", new java.lang.Integer JavaDoc (7));
30     _methods.put ("ref_add_value_at", new java.lang.Integer JavaDoc (8));
31     _methods.put ("ref_modify_value", new java.lang.Integer JavaDoc (9));
32     _methods.put ("ref_modify_value_at", new java.lang.Integer JavaDoc (10));
33     _methods.put ("ref_remove_value", new java.lang.Integer JavaDoc (11));
34     _methods.put ("ref_remove_value_at", new java.lang.Integer JavaDoc (12));
35     _methods.put ("ref_immediate_composite", new java.lang.Integer JavaDoc (13));
36     _methods.put ("ref_outermost_composite", new java.lang.Integer JavaDoc (14));
37     _methods.put ("ref_invoke_operation", new java.lang.Integer JavaDoc (15));
38     _methods.put ("ref_mof_id", new java.lang.Integer JavaDoc (16));
39     _methods.put ("ref_meta_object", new java.lang.Integer JavaDoc (17));
40     _methods.put ("ref_itself", new java.lang.Integer JavaDoc (18));
41     _methods.put ("ref_immediate_package", new java.lang.Integer JavaDoc (19));
42     _methods.put ("ref_outermost_package", new java.lang.Integer JavaDoc (20));
43     _methods.put ("ref_delete", new java.lang.Integer JavaDoc (21));
44   }
45
46   public org.omg.CORBA.portable.OutputStream JavaDoc _invoke (String JavaDoc $method,
47                                 org.omg.CORBA.portable.InputStream JavaDoc in,
48                                 org.omg.CORBA.portable.ResponseHandler JavaDoc $rh)
49   {
50     org.omg.CORBA.portable.OutputStream JavaDoc out = null;
51     java.lang.Integer JavaDoc __method = (java.lang.Integer JavaDoc)_methods.get ($method);
52     if (__method == null)
53       throw new org.omg.CORBA.BAD_OPERATION JavaDoc (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
54
55     switch (__method.intValue ())
56     {
57        case 0: // org/omg/mof/Reflective/RefObject/ref_is_instance_of
58
{
59          org.omg.mof.Reflective.RefObject some_class = org.omg.mof.Reflective.DesignatorTypeHelper.read (in);
60          boolean consider_subtypes = in.read_boolean ();
61          boolean $result = false;
62          $result = this.ref_is_instance_of (some_class, consider_subtypes);
63          out = $rh.createReply();
64          out.write_boolean ($result);
65          break;
66        }
67
68        case 1: // org/omg/mof/Reflective/RefObject/ref_create_instance
69
{
70          try {
71            org.omg.CORBA.Any JavaDoc args[] = org.omg.mof.Reflective.ValueTypeListHelper.read (in);
72            org.omg.mof.Reflective.RefObject $result = null;
73            $result = this.ref_create_instance (args);
74            out = $rh.createReply();
75            org.omg.mof.Reflective.RefObjectHelper.write (out, $result);
76          } catch (org.omg.mof.Reflective.MofError $ex) {
77            out = $rh.createExceptionReply ();
78            org.omg.mof.Reflective.MofErrorHelper.write (out, $ex);
79          }
80          break;
81        }
82
83        case 2: // org/omg/mof/Reflective/RefObject/ref_all_objects
84
{
85          boolean include_subtypes = in.read_boolean ();
86          org.omg.mof.Reflective.RefObject $result[] = null;
87          $result = this.ref_all_objects (include_subtypes);
88          out = $rh.createReply();
89          org.omg.mof.Reflective.RefObjectSetHelper.write (out, $result);
90          break;
91        }
92
93        case 3: // org/omg/mof/Reflective/RefObject/ref_set_value
94
{
95          try {
96            org.omg.mof.Reflective.RefObject feature = org.omg.mof.Reflective.DesignatorTypeHelper.read (in);
97            org.omg.CORBA.Any JavaDoc new_value = org.omg.mof.Reflective._ValueTypeHelper.read (in);
98            this.ref_set_value (feature, new_value);
99            out = $rh.createReply();
100          } catch (org.omg.mof.Reflective.MofError $ex) {
101            out = $rh.createExceptionReply ();
102            org.omg.mof.Reflective.MofErrorHelper.write (out, $ex);
103          }
104          break;
105        }
106
107        case 4: // org/omg/mof/Reflective/RefObject/ref_value
108
{
109          try {
110            org.omg.mof.Reflective.RefObject feature = org.omg.mof.Reflective.DesignatorTypeHelper.read (in);
111            org.omg.CORBA.Any JavaDoc $result = null;
112            $result = this.ref_value (feature);
113            out = $rh.createReply();
114            out.write_any ($result);
115          } catch (org.omg.mof.Reflective.NotSet $ex) {
116            out = $rh.createExceptionReply ();
117            org.omg.mof.Reflective.NotSetHelper.write (out, $ex);
118          } catch (org.omg.mof.Reflective.MofError $ex) {
119            out = $rh.createExceptionReply ();
120            org.omg.mof.Reflective.MofErrorHelper.write (out, $ex);
121          }
122          break;
123        }
124
125        case 5: // org/omg/mof/Reflective/RefObject/ref_unset_value
126
{
127          try {
128            this.ref_unset_value ();
129            out = $rh.createReply();
130          } catch (org.omg.mof.Reflective.MofError $ex) {
131            out = $rh.createExceptionReply ();
132            org.omg.mof.Reflective.MofErrorHelper.write (out, $ex);
133          }
134          break;
135        }
136
137        case 6: // org/omg/mof/Reflective/RefObject/ref_add_value
138
{
139          try {
140            org.omg.mof.Reflective.RefObject feature = org.omg.mof.Reflective.DesignatorTypeHelper.read (in);
141            org.omg.CORBA.Any JavaDoc new_element = org.omg.mof.Reflective._ValueTypeHelper.read (in);
142            this.ref_add_value (feature, new_element);
143            out = $rh.createReply();
144          } catch (org.omg.mof.Reflective.MofError $ex) {
145            out = $rh.createExceptionReply ();
146            org.omg.mof.Reflective.MofErrorHelper.write (out, $ex);
147          }
148          break;
149        }
150
151        case 7: // org/omg/mof/Reflective/RefObject/ref_add_value_before
152
{
153          try {
154            org.omg.mof.Reflective.RefObject feature = org.omg.mof.Reflective.DesignatorTypeHelper.read (in);
155            org.omg.CORBA.Any JavaDoc new_element = org.omg.mof.Reflective._ValueTypeHelper.read (in);
156            org.omg.CORBA.Any JavaDoc before_element = org.omg.mof.Reflective._ValueTypeHelper.read (in);
157            this.ref_add_value_before (feature, new_element, before_element);
158            out = $rh.createReply();
159          } catch (org.omg.mof.Reflective.NotFound $ex) {
160            out = $rh.createExceptionReply ();
161            org.omg.mof.Reflective.NotFoundHelper.write (out, $ex);
162          } catch (org.omg.mof.Reflective.MofError $ex) {
163            out = $rh.createExceptionReply ();
164            org.omg.mof.Reflective.MofErrorHelper.write (out, $ex);
165          }
166          break;
167        }
168
169        case 8: // org/omg/mof/Reflective/RefObject/ref_add_value_at
170
{
171          try {
172            org.omg.mof.Reflective.RefObject feature = org.omg.mof.Reflective.DesignatorTypeHelper.read (in);
173            org.omg.CORBA.Any JavaDoc new_element = org.omg.mof.Reflective._ValueTypeHelper.read (in);
174            int position = in.read_ulong ();
175            this.ref_add_value_at (feature, new_element, position);
176            out = $rh.createReply();
177          } catch (org.omg.mof.Reflective.BadPosition $ex) {
178            out = $rh.createExceptionReply ();
179            org.omg.mof.Reflective.BadPositionHelper.write (out, $ex);
180          } catch (org.omg.mof.Reflective.MofError $ex) {
181            out = $rh.createExceptionReply ();
182            org.omg.mof.Reflective.MofErrorHelper.write (out, $ex);
183          }
184          break;
185        }
186
187        case 9: // org/omg/mof/Reflective/RefObject/ref_modify_value
188
{
189          try {
190            org.omg.mof.Reflective.RefObject feature = org.omg.mof.Reflective.DesignatorTypeHelper.read (in);
191            org.omg.CORBA.Any JavaDoc old_element = org.omg.mof.Reflective._ValueTypeHelper.read (in);
192            org.omg.CORBA.Any JavaDoc new_element = org.omg.mof.Reflective._ValueTypeHelper.read (in);
193            this.ref_modify_value (feature, old_element, new_element);
194            out = $rh.createReply();
195          } catch (org.omg.mof.Reflective.NotFound $ex) {
196            out = $rh.createExceptionReply ();
197            org.omg.mof.Reflective.NotFoundHelper.write (out, $ex);
198          } catch (org.omg.mof.Reflective.MofError $ex) {
199            out = $rh.createExceptionReply ();
200            org.omg.mof.Reflective.MofErrorHelper.write (out, $ex);
201          }
202          break;
203        }
204
205        case 10: // org/omg/mof/Reflective/RefObject/ref_modify_value_at
206
{
207          try {
208            org.omg.mof.Reflective.RefObject feature = org.omg.mof.Reflective.DesignatorTypeHelper.read (in);
209            org.omg.CORBA.Any JavaDoc new_element = org.omg.mof.Reflective._ValueTypeHelper.read (in);
210            int position = in.read_ulong ();
211            this.ref_modify_value_at (feature, new_element, position);
212            out = $rh.createReply();
213          } catch (org.omg.mof.Reflective.BadPosition $ex) {
214            out = $rh.createExceptionReply ();
215            org.omg.mof.Reflective.BadPositionHelper.write (out, $ex);
216          } catch (org.omg.mof.Reflective.MofError $ex) {
217            out = $rh.createExceptionReply ();
218            org.omg.mof.Reflective.MofErrorHelper.write (out, $ex);
219          }
220          break;
221        }
222
223        case 11: // org/omg/mof/Reflective/RefObject/ref_remove_value
224
{
225          try {
226            org.omg.mof.Reflective.RefObject feature = org.omg.mof.Reflective.DesignatorTypeHelper.read (in);
227            org.omg.CORBA.Any JavaDoc existing_element = org.omg.mof.Reflective._ValueTypeHelper.read (in);
228            this.ref_remove_value (feature, existing_element);
229            out = $rh.createReply();
230          } catch (org.omg.mof.Reflective.NotFound $ex) {
231            out = $rh.createExceptionReply ();
232            org.omg.mof.Reflective.NotFoundHelper.write (out, $ex);
233          } catch (org.omg.mof.Reflective.MofError $ex) {
234            out = $rh.createExceptionReply ();
235            org.omg.mof.Reflective.MofErrorHelper.write (out, $ex);
236          }
237          break;
238        }
239
240        case 12: // org/omg/mof/Reflective/RefObject/ref_remove_value_at
241
{
242          try {
243            org.omg.mof.Reflective.RefObject feature = org.omg.mof.Reflective.DesignatorTypeHelper.read (in);
244            int position = in.read_ulong ();
245            this.ref_remove_value_at (feature, position);
246            out = $rh.createReply();
247          } catch (org.omg.mof.Reflective.BadPosition $ex) {
248            out = $rh.createExceptionReply ();
249            org.omg.mof.Reflective.BadPositionHelper.write (out, $ex);
250          } catch (org.omg.mof.Reflective.MofError $ex) {
251            out = $rh.createExceptionReply ();
252            org.omg.mof.Reflective.MofErrorHelper.write (out, $ex);
253          }
254          break;
255        }
256
257        case 13: // org/omg/mof/Reflective/RefObject/ref_immediate_composite
258
{
259          org.omg.mof.Reflective.RefObject $result = null;
260          $result = this.ref_immediate_composite ();
261          out = $rh.createReply();
262          org.omg.mof.Reflective.RefObjectHelper.write (out, $result);
263          break;
264        }
265
266        case 14: // org/omg/mof/Reflective/RefObject/ref_outermost_composite
267
{
268          org.omg.mof.Reflective.RefObject $result = null;
269          $result = this.ref_outermost_composite ();
270          out = $rh.createReply();
271          org.omg.mof.Reflective.RefObjectHelper.write (out, $result);
272          break;
273        }
274
275        case 15: // org/omg/mof/Reflective/RefObject/ref_invoke_operation
276
{
277          try {
278            org.omg.mof.Reflective.RefObject requested_operation = org.omg.mof.Reflective.DesignatorTypeHelper.read (in);
279            org.omg.mof.Reflective.ValueTypeListHolder args = new org.omg.mof.Reflective.ValueTypeListHolder ();
280            args.value = org.omg.mof.Reflective.ValueTypeListHelper.read (in);
281            org.omg.CORBA.Any JavaDoc $result = null;
282            $result = this.ref_invoke_operation (requested_operation, args);
283            out = $rh.createReply();
284            out.write_any ($result);
285            org.omg.mof.Reflective.ValueTypeListHelper.write (out, args.value);
286          } catch (org.omg.mof.Reflective.OtherException $ex) {
287            out = $rh.createExceptionReply ();
288            org.omg.mof.Reflective.OtherExceptionHelper.write (out, $ex);
289          } catch (org.omg.mof.Reflective.MofError $ex) {
290            out = $rh.createExceptionReply ();
291            org.omg.mof.Reflective.MofErrorHelper.write (out, $ex);
292          }
293          break;
294        }
295
296        case 16: // org/omg/mof/Reflective/RefBaseObject/ref_mof_id
297
{
298          String JavaDoc $result = null;
299          $result = this.ref_mof_id ();
300          out = $rh.createReply();
301          out.write_string ($result);
302          break;
303        }
304
305        case 17: // org/omg/mof/Reflective/RefBaseObject/ref_meta_object
306
{
307          org.omg.mof.Reflective.RefObject $result = null;
308          $result = this.ref_meta_object ();
309          out = $rh.createReply();
310          org.omg.mof.Reflective.RefObjectHelper.write (out, $result);
311          break;
312        }
313
314        case 18: // org/omg/mof/Reflective/RefBaseObject/ref_itself
315
{
316          org.omg.mof.Reflective.RefBaseObject other_object = org.omg.mof.Reflective.RefBaseObjectHelper.read (in);
317          boolean $result = false;
318          $result = this.ref_itself (other_object);
319          out = $rh.createReply();
320          out.write_boolean ($result);
321          break;
322        }
323
324        case 19: // org/omg/mof/Reflective/RefBaseObject/ref_immediate_package
325
{
326          org.omg.mof.Reflective._RefPackage $result = null;
327          $result = this.ref_immediate_package ();
328          out = $rh.createReply();
329          org.omg.mof.Reflective._RefPackageHelper.write (out, $result);
330          break;
331        }
332
333        case 20: // org/omg/mof/Reflective/RefBaseObject/ref_outermost_package
334
{
335          org.omg.mof.Reflective._RefPackage $result = null;
336          $result = this.ref_outermost_package ();
337          out = $rh.createReply();
338          org.omg.mof.Reflective._RefPackageHelper.write (out, $result);
339          break;
340        }
341
342        case 21: // org/omg/mof/Reflective/RefBaseObject/ref_delete
343
{
344          try {
345            this.ref_delete ();
346            out = $rh.createReply();
347          } catch (org.omg.mof.Reflective.MofError $ex) {
348            out = $rh.createExceptionReply ();
349            org.omg.mof.Reflective.MofErrorHelper.write (out, $ex);
350          }
351          break;
352        }
353
354        default:
355          throw new org.omg.CORBA.BAD_OPERATION JavaDoc (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
356     }
357
358     return out;
359   } // _invoke
360

361   // Type-specific CORBA::Object operations
362
private static String JavaDoc[] __ids = {
363     "IDL:org/omg/mof/Reflective/RefObject:1.0",
364     "IDL:org/omg/mof/Reflective/RefBaseObject:1.0"};
365
366   public String JavaDoc[] _all_interfaces (org.omg.PortableServer.POA JavaDoc poa, byte[] objectId)
367   {
368     return (String JavaDoc[])__ids.clone ();
369   }
370
371   public RefObject _this()
372   {
373     return RefObjectHelper.narrow(
374     super._this_object());
375   }
376
377   public RefObject _this(org.omg.CORBA.ORB JavaDoc orb)
378   {
379     return RefObjectHelper.narrow(
380     super._this_object(orb));
381   }
382
383
384 } // class RefObjectPOA
385
Popular Tags