1 package org.omg.mof.Reflective; 2 3 4 10 11 12 public abstract class RefObjectPOA extends org.omg.PortableServer.Servant 14 implements org.omg.mof.Reflective.RefObjectOperations, org.omg.CORBA.portable.InvokeHandler 15 { 16 17 19 private static java.util.Hashtable _methods = new java.util.Hashtable (); 20 static 21 { 22 _methods.put ("ref_is_instance_of", new java.lang.Integer (0)); 23 _methods.put ("ref_create_instance", new java.lang.Integer (1)); 24 _methods.put ("ref_all_objects", new java.lang.Integer (2)); 25 _methods.put ("ref_set_value", new java.lang.Integer (3)); 26 _methods.put ("ref_value", new java.lang.Integer (4)); 27 _methods.put ("ref_unset_value", new java.lang.Integer (5)); 28 _methods.put ("ref_add_value", new java.lang.Integer (6)); 29 _methods.put ("ref_add_value_before", new java.lang.Integer (7)); 30 _methods.put ("ref_add_value_at", new java.lang.Integer (8)); 31 _methods.put ("ref_modify_value", new java.lang.Integer (9)); 32 _methods.put ("ref_modify_value_at", new java.lang.Integer (10)); 33 _methods.put ("ref_remove_value", new java.lang.Integer (11)); 34 _methods.put ("ref_remove_value_at", new java.lang.Integer (12)); 35 _methods.put ("ref_immediate_composite", new java.lang.Integer (13)); 36 _methods.put ("ref_outermost_composite", new java.lang.Integer (14)); 37 _methods.put ("ref_invoke_operation", new java.lang.Integer (15)); 38 _methods.put ("ref_mof_id", new java.lang.Integer (16)); 39 _methods.put ("ref_meta_object", new java.lang.Integer (17)); 40 _methods.put ("ref_itself", new java.lang.Integer (18)); 41 _methods.put ("ref_immediate_package", new java.lang.Integer (19)); 42 _methods.put ("ref_outermost_package", new java.lang.Integer (20)); 43 _methods.put ("ref_delete", new java.lang.Integer (21)); 44 } 45 46 public org.omg.CORBA.portable.OutputStream _invoke (String $method, 47 org.omg.CORBA.portable.InputStream in, 48 org.omg.CORBA.portable.ResponseHandler $rh) 49 { 50 org.omg.CORBA.portable.OutputStream out = null; 51 java.lang.Integer __method = (java.lang.Integer )_methods.get ($method); 52 if (__method == null) 53 throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); 54 55 switch (__method.intValue ()) 56 { 57 case 0: { 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: { 70 try { 71 org.omg.CORBA.Any 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: { 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: { 95 try { 96 org.omg.mof.Reflective.RefObject feature = org.omg.mof.Reflective.DesignatorTypeHelper.read (in); 97 org.omg.CORBA.Any 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: { 109 try { 110 org.omg.mof.Reflective.RefObject feature = org.omg.mof.Reflective.DesignatorTypeHelper.read (in); 111 org.omg.CORBA.Any $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: { 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: { 139 try { 140 org.omg.mof.Reflective.RefObject feature = org.omg.mof.Reflective.DesignatorTypeHelper.read (in); 141 org.omg.CORBA.Any 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: { 153 try { 154 org.omg.mof.Reflective.RefObject feature = org.omg.mof.Reflective.DesignatorTypeHelper.read (in); 155 org.omg.CORBA.Any new_element = org.omg.mof.Reflective._ValueTypeHelper.read (in); 156 org.omg.CORBA.Any 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: { 171 try { 172 org.omg.mof.Reflective.RefObject feature = org.omg.mof.Reflective.DesignatorTypeHelper.read (in); 173 org.omg.CORBA.Any 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: { 189 try { 190 org.omg.mof.Reflective.RefObject feature = org.omg.mof.Reflective.DesignatorTypeHelper.read (in); 191 org.omg.CORBA.Any old_element = org.omg.mof.Reflective._ValueTypeHelper.read (in); 192 org.omg.CORBA.Any 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: { 207 try { 208 org.omg.mof.Reflective.RefObject feature = org.omg.mof.Reflective.DesignatorTypeHelper.read (in); 209 org.omg.CORBA.Any 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: { 225 try { 226 org.omg.mof.Reflective.RefObject feature = org.omg.mof.Reflective.DesignatorTypeHelper.read (in); 227 org.omg.CORBA.Any 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: { 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: { 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: { 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: { 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 $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: { 298 String $result = null; 299 $result = this.ref_mof_id (); 300 out = $rh.createReply(); 301 out.write_string ($result); 302 break; 303 } 304 305 case 17: { 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: { 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: { 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: { 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: { 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 (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); 356 } 357 358 return out; 359 } 361 private static String [] __ids = { 363 "IDL:org/omg/mof/Reflective/RefObject:1.0", 364 "IDL:org/omg/mof/Reflective/RefBaseObject:1.0"}; 365 366 public String [] _all_interfaces (org.omg.PortableServer.POA poa, byte[] objectId) 367 { 368 return (String [])__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 orb) 378 { 379 return RefObjectHelper.narrow( 380 super._this_object(orb)); 381 } 382 383 384 } | Popular Tags |