KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.omg.mof.Reflective;
2
3
4 /**
5 * org/omg/mof/Reflective/RefAssociationPOA.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 RefObject interface
13
public abstract class RefAssociationPOA extends org.omg.PortableServer.Servant JavaDoc
14  implements org.omg.mof.Reflective.RefAssociationOperations, 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_all_links", new java.lang.Integer JavaDoc (0));
23     _methods.put ("ref_link_exists", new java.lang.Integer JavaDoc (1));
24     _methods.put ("ref_query", new java.lang.Integer JavaDoc (2));
25     _methods.put ("ref_add_link", new java.lang.Integer JavaDoc (3));
26     _methods.put ("ref_add_link_before", new java.lang.Integer JavaDoc (4));
27     _methods.put ("ref_modify_link", new java.lang.Integer JavaDoc (5));
28     _methods.put ("ref_remove_link", new java.lang.Integer JavaDoc (6));
29     _methods.put ("ref_mof_id", new java.lang.Integer JavaDoc (7));
30     _methods.put ("ref_meta_object", new java.lang.Integer JavaDoc (8));
31     _methods.put ("ref_itself", new java.lang.Integer JavaDoc (9));
32     _methods.put ("ref_immediate_package", new java.lang.Integer JavaDoc (10));
33     _methods.put ("ref_outermost_package", new java.lang.Integer JavaDoc (11));
34     _methods.put ("ref_delete", new java.lang.Integer JavaDoc (12));
35   }
36
37   public org.omg.CORBA.portable.OutputStream JavaDoc _invoke (String JavaDoc $method,
38                                 org.omg.CORBA.portable.InputStream JavaDoc in,
39                                 org.omg.CORBA.portable.ResponseHandler JavaDoc $rh)
40   {
41     org.omg.CORBA.portable.OutputStream JavaDoc out = null;
42     java.lang.Integer JavaDoc __method = (java.lang.Integer JavaDoc)_methods.get ($method);
43     if (__method == null)
44       throw new org.omg.CORBA.BAD_OPERATION JavaDoc (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
45
46     switch (__method.intValue ())
47     {
48        case 0: // org/omg/mof/Reflective/RefAssociation/ref_all_links
49
{
50          org.omg.mof.Reflective.RefObject $result[][] = null;
51          $result = this.ref_all_links ();
52          out = $rh.createReply();
53          org.omg.mof.Reflective.LinkSetHelper.write (out, $result);
54          break;
55        }
56
57        case 1: // org/omg/mof/Reflective/RefAssociation/ref_link_exists
58
{
59          try {
60            org.omg.mof.Reflective.RefObject some_link[] = org.omg.mof.Reflective.LinkHelper.read (in);
61            boolean $result = false;
62            $result = this.ref_link_exists (some_link);
63            out = $rh.createReply();
64            out.write_boolean ($result);
65          } catch (org.omg.mof.Reflective.MofError $ex) {
66            out = $rh.createExceptionReply ();
67            org.omg.mof.Reflective.MofErrorHelper.write (out, $ex);
68          }
69          break;
70        }
71
72        case 2: // org/omg/mof/Reflective/RefAssociation/ref_query
73
{
74          try {
75            org.omg.mof.Reflective.RefObject query_end = org.omg.mof.Reflective.DesignatorTypeHelper.read (in);
76            org.omg.mof.Reflective.RefObject query_object = org.omg.mof.Reflective.RefObjectHelper.read (in);
77            org.omg.mof.Reflective.RefObject $result[] = null;
78            $result = this.ref_query (query_end, query_object);
79            out = $rh.createReply();
80            org.omg.mof.Reflective.RefObjectUListHelper.write (out, $result);
81          } catch (org.omg.mof.Reflective.MofError $ex) {
82            out = $rh.createExceptionReply ();
83            org.omg.mof.Reflective.MofErrorHelper.write (out, $ex);
84          }
85          break;
86        }
87
88        case 3: // org/omg/mof/Reflective/RefAssociation/ref_add_link
89
{
90          try {
91            org.omg.mof.Reflective.RefObject new_link[] = org.omg.mof.Reflective.LinkHelper.read (in);
92            this.ref_add_link (new_link);
93            out = $rh.createReply();
94          } catch (org.omg.mof.Reflective.MofError $ex) {
95            out = $rh.createExceptionReply ();
96            org.omg.mof.Reflective.MofErrorHelper.write (out, $ex);
97          }
98          break;
99        }
100
101        case 4: // org/omg/mof/Reflective/RefAssociation/ref_add_link_before
102
{
103          try {
104            org.omg.mof.Reflective.RefObject new_link[] = org.omg.mof.Reflective.LinkHelper.read (in);
105            org.omg.mof.Reflective.RefObject position_end = org.omg.mof.Reflective.DesignatorTypeHelper.read (in);
106            org.omg.mof.Reflective.RefObject before = org.omg.mof.Reflective.RefObjectHelper.read (in);
107            this.ref_add_link_before (new_link, position_end, before);
108            out = $rh.createReply();
109          } catch (org.omg.mof.Reflective.NotFound $ex) {
110            out = $rh.createExceptionReply ();
111            org.omg.mof.Reflective.NotFoundHelper.write (out, $ex);
112          } catch (org.omg.mof.Reflective.MofError $ex) {
113            out = $rh.createExceptionReply ();
114            org.omg.mof.Reflective.MofErrorHelper.write (out, $ex);
115          }
116          break;
117        }
118
119        case 5: // org/omg/mof/Reflective/RefAssociation/ref_modify_link
120
{
121          try {
122            org.omg.mof.Reflective.RefObject old_link[] = org.omg.mof.Reflective.LinkHelper.read (in);
123            org.omg.mof.Reflective.RefObject position_end = org.omg.mof.Reflective.DesignatorTypeHelper.read (in);
124            org.omg.mof.Reflective.RefObject new_object = org.omg.mof.Reflective.RefObjectHelper.read (in);
125            this.ref_modify_link (old_link, position_end, new_object);
126            out = $rh.createReply();
127          } catch (org.omg.mof.Reflective.NotFound $ex) {
128            out = $rh.createExceptionReply ();
129            org.omg.mof.Reflective.NotFoundHelper.write (out, $ex);
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/RefAssociation/ref_remove_link
138
{
139          try {
140            org.omg.mof.Reflective.RefObject old_link[] = org.omg.mof.Reflective.LinkHelper.read (in);
141            this.ref_remove_link (old_link);
142            out = $rh.createReply();
143          } catch (org.omg.mof.Reflective.NotFound $ex) {
144            out = $rh.createExceptionReply ();
145            org.omg.mof.Reflective.NotFoundHelper.write (out, $ex);
146          } catch (org.omg.mof.Reflective.MofError $ex) {
147            out = $rh.createExceptionReply ();
148            org.omg.mof.Reflective.MofErrorHelper.write (out, $ex);
149          }
150          break;
151        }
152
153        case 7: // org/omg/mof/Reflective/RefBaseObject/ref_mof_id
154
{
155          String JavaDoc $result = null;
156          $result = this.ref_mof_id ();
157          out = $rh.createReply();
158          out.write_string ($result);
159          break;
160        }
161
162        case 8: // org/omg/mof/Reflective/RefBaseObject/ref_meta_object
163
{
164          org.omg.mof.Reflective.RefObject $result = null;
165          $result = this.ref_meta_object ();
166          out = $rh.createReply();
167          org.omg.mof.Reflective.RefObjectHelper.write (out, $result);
168          break;
169        }
170
171        case 9: // org/omg/mof/Reflective/RefBaseObject/ref_itself
172
{
173          org.omg.mof.Reflective.RefBaseObject other_object = org.omg.mof.Reflective.RefBaseObjectHelper.read (in);
174          boolean $result = false;
175          $result = this.ref_itself (other_object);
176          out = $rh.createReply();
177          out.write_boolean ($result);
178          break;
179        }
180
181        case 10: // org/omg/mof/Reflective/RefBaseObject/ref_immediate_package
182
{
183          org.omg.mof.Reflective._RefPackage $result = null;
184          $result = this.ref_immediate_package ();
185          out = $rh.createReply();
186          org.omg.mof.Reflective._RefPackageHelper.write (out, $result);
187          break;
188        }
189
190        case 11: // org/omg/mof/Reflective/RefBaseObject/ref_outermost_package
191
{
192          org.omg.mof.Reflective._RefPackage $result = null;
193          $result = this.ref_outermost_package ();
194          out = $rh.createReply();
195          org.omg.mof.Reflective._RefPackageHelper.write (out, $result);
196          break;
197        }
198
199        case 12: // org/omg/mof/Reflective/RefBaseObject/ref_delete
200
{
201          try {
202            this.ref_delete ();
203            out = $rh.createReply();
204          } catch (org.omg.mof.Reflective.MofError $ex) {
205            out = $rh.createExceptionReply ();
206            org.omg.mof.Reflective.MofErrorHelper.write (out, $ex);
207          }
208          break;
209        }
210
211        default:
212          throw new org.omg.CORBA.BAD_OPERATION JavaDoc (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
213     }
214
215     return out;
216   } // _invoke
217

218   // Type-specific CORBA::Object operations
219
private static String JavaDoc[] __ids = {
220     "IDL:org/omg/mof/Reflective/RefAssociation:1.0",
221     "IDL:org/omg/mof/Reflective/RefBaseObject:1.0"};
222
223   public String JavaDoc[] _all_interfaces (org.omg.PortableServer.POA JavaDoc poa, byte[] objectId)
224   {
225     return (String JavaDoc[])__ids.clone ();
226   }
227
228   public RefAssociation _this()
229   {
230     return RefAssociationHelper.narrow(
231     super._this_object());
232   }
233
234   public RefAssociation _this(org.omg.CORBA.ORB JavaDoc orb)
235   {
236     return RefAssociationHelper.narrow(
237     super._this_object(orb));
238   }
239
240
241 } // class RefAssociationPOA
242
Popular Tags