1 package org.omg.CosNaming; 2 3 4 10 11 12 25 public abstract class NamingContextExtPOA extends org.omg.PortableServer.Servant 26 implements org.omg.CosNaming.NamingContextExtOperations , org.omg.CORBA.portable.InvokeHandler 27 { 28 29 31 private static java.util.Hashtable _methods = new java.util.Hashtable (); 32 static 33 { 34 _methods.put ("to_string", new java.lang.Integer (0)); 35 _methods.put ("to_name", new java.lang.Integer (1)); 36 _methods.put ("to_url", new java.lang.Integer (2)); 37 _methods.put ("resolve_str", new java.lang.Integer (3)); 38 _methods.put ("bind", new java.lang.Integer (4)); 39 _methods.put ("bind_context", new java.lang.Integer (5)); 40 _methods.put ("rebind", new java.lang.Integer (6)); 41 _methods.put ("rebind_context", new java.lang.Integer (7)); 42 _methods.put ("resolve", new java.lang.Integer (8)); 43 _methods.put ("unbind", new java.lang.Integer (9)); 44 _methods.put ("list", new java.lang.Integer (10)); 45 _methods.put ("new_context", new java.lang.Integer (11)); 46 _methods.put ("bind_new_context", new java.lang.Integer (12)); 47 _methods.put ("destroy", new java.lang.Integer (13)); 48 } 49 50 public org.omg.CORBA.portable.OutputStream _invoke (String $method, 51 org.omg.CORBA.portable.InputStream in, 52 org.omg.CORBA.portable.ResponseHandler $rh) 53 { 54 org.omg.CORBA.portable.OutputStream out = null; 55 java.lang.Integer __method = (java.lang.Integer )_methods.get ($method); 56 if (__method == null) 57 throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); 58 59 switch (__method.intValue ()) 60 { 61 62 72 case 0: { 74 try { 75 org.omg.CosNaming.NameComponent n[] = org.omg.CosNaming.NameHelper.read (in); 76 String $result = null; 77 $result = this.to_string (n); 78 out = $rh.createReply(); 79 out.write_string ($result); 80 } catch (org.omg.CosNaming.NamingContextPackage.InvalidName $ex) { 81 out = $rh.createExceptionReply (); 82 org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.write (out, $ex); 83 } 84 break; 85 } 86 87 88 98 case 1: { 100 try { 101 String sn = org.omg.CosNaming.NamingContextExtPackage.StringNameHelper.read (in); 102 org.omg.CosNaming.NameComponent $result[] = null; 103 $result = this.to_name (sn); 104 out = $rh.createReply(); 105 org.omg.CosNaming.NameHelper.write (out, $result); 106 } catch (org.omg.CosNaming.NamingContextPackage.InvalidName $ex) { 107 out = $rh.createExceptionReply (); 108 org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.write (out, $ex); 109 } 110 break; 111 } 112 113 114 128 case 2: { 130 try { 131 String addr = org.omg.CosNaming.NamingContextExtPackage.AddressHelper.read (in); 132 String sn = org.omg.CosNaming.NamingContextExtPackage.StringNameHelper.read (in); 133 String $result = null; 134 $result = this.to_url (addr, sn); 135 out = $rh.createReply(); 136 out.write_string ($result); 137 } catch (org.omg.CosNaming.NamingContextExtPackage.InvalidAddress $ex) { 138 out = $rh.createExceptionReply (); 139 org.omg.CosNaming.NamingContextExtPackage.InvalidAddressHelper.write (out, $ex); 140 } catch (org.omg.CosNaming.NamingContextPackage.InvalidName $ex) { 141 out = $rh.createExceptionReply (); 142 org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.write (out, $ex); 143 } 144 break; 145 } 146 147 148 162 case 3: { 164 try { 165 String sn = org.omg.CosNaming.NamingContextExtPackage.StringNameHelper.read (in); 166 org.omg.CORBA.Object $result = null; 167 $result = this.resolve_str (sn); 168 out = $rh.createReply(); 169 org.omg.CORBA.ObjectHelper.write (out, $result); 170 } catch (org.omg.CosNaming.NamingContextPackage.NotFound $ex) { 171 out = $rh.createExceptionReply (); 172 org.omg.CosNaming.NamingContextPackage.NotFoundHelper.write (out, $ex); 173 } catch (org.omg.CosNaming.NamingContextPackage.CannotProceed $ex) { 174 out = $rh.createExceptionReply (); 175 org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.write (out, $ex); 176 } catch (org.omg.CosNaming.NamingContextPackage.InvalidName $ex) { 177 out = $rh.createExceptionReply (); 178 org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.write (out, $ex); 179 } 180 break; 181 } 182 183 184 207 case 4: { 209 try { 210 org.omg.CosNaming.NameComponent n[] = org.omg.CosNaming.NameHelper.read (in); 211 org.omg.CORBA.Object obj = org.omg.CORBA.ObjectHelper.read (in); 212 this.bind (n, obj); 213 out = $rh.createReply(); 214 } catch (org.omg.CosNaming.NamingContextPackage.NotFound $ex) { 215 out = $rh.createExceptionReply (); 216 org.omg.CosNaming.NamingContextPackage.NotFoundHelper.write (out, $ex); 217 } catch (org.omg.CosNaming.NamingContextPackage.CannotProceed $ex) { 218 out = $rh.createExceptionReply (); 219 org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.write (out, $ex); 220 } catch (org.omg.CosNaming.NamingContextPackage.InvalidName $ex) { 221 out = $rh.createExceptionReply (); 222 org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.write (out, $ex); 223 } catch (org.omg.CosNaming.NamingContextPackage.AlreadyBound $ex) { 224 out = $rh.createExceptionReply (); 225 org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.write (out, $ex); 226 } 227 break; 228 } 229 230 231 251 case 5: { 253 try { 254 org.omg.CosNaming.NameComponent n[] = org.omg.CosNaming.NameHelper.read (in); 255 org.omg.CosNaming.NamingContext nc = org.omg.CosNaming.NamingContextHelper.read (in); 256 this.bind_context (n, nc); 257 out = $rh.createReply(); 258 } catch (org.omg.CosNaming.NamingContextPackage.NotFound $ex) { 259 out = $rh.createExceptionReply (); 260 org.omg.CosNaming.NamingContextPackage.NotFoundHelper.write (out, $ex); 261 } catch (org.omg.CosNaming.NamingContextPackage.CannotProceed $ex) { 262 out = $rh.createExceptionReply (); 263 org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.write (out, $ex); 264 } catch (org.omg.CosNaming.NamingContextPackage.InvalidName $ex) { 265 out = $rh.createExceptionReply (); 266 org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.write (out, $ex); 267 } catch (org.omg.CosNaming.NamingContextPackage.AlreadyBound $ex) { 268 out = $rh.createExceptionReply (); 269 org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.write (out, $ex); 270 } 271 break; 272 } 273 274 275 293 case 6: { 295 try { 296 org.omg.CosNaming.NameComponent n[] = org.omg.CosNaming.NameHelper.read (in); 297 org.omg.CORBA.Object obj = org.omg.CORBA.ObjectHelper.read (in); 298 this.rebind (n, obj); 299 out = $rh.createReply(); 300 } catch (org.omg.CosNaming.NamingContextPackage.NotFound $ex) { 301 out = $rh.createExceptionReply (); 302 org.omg.CosNaming.NamingContextPackage.NotFoundHelper.write (out, $ex); 303 } catch (org.omg.CosNaming.NamingContextPackage.CannotProceed $ex) { 304 out = $rh.createExceptionReply (); 305 org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.write (out, $ex); 306 } catch (org.omg.CosNaming.NamingContextPackage.InvalidName $ex) { 307 out = $rh.createExceptionReply (); 308 org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.write (out, $ex); 309 } 310 break; 311 } 312 313 314 332 case 7: { 334 try { 335 org.omg.CosNaming.NameComponent n[] = org.omg.CosNaming.NameHelper.read (in); 336 org.omg.CosNaming.NamingContext nc = org.omg.CosNaming.NamingContextHelper.read (in); 337 this.rebind_context (n, nc); 338 out = $rh.createReply(); 339 } catch (org.omg.CosNaming.NamingContextPackage.NotFound $ex) { 340 out = $rh.createExceptionReply (); 341 org.omg.CosNaming.NamingContextPackage.NotFoundHelper.write (out, $ex); 342 } catch (org.omg.CosNaming.NamingContextPackage.CannotProceed $ex) { 343 out = $rh.createExceptionReply (); 344 org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.write (out, $ex); 345 } catch (org.omg.CosNaming.NamingContextPackage.InvalidName $ex) { 346 out = $rh.createExceptionReply (); 347 org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.write (out, $ex); 348 } 349 break; 350 } 351 352 353 371 case 8: { 373 try { 374 org.omg.CosNaming.NameComponent n[] = org.omg.CosNaming.NameHelper.read (in); 375 org.omg.CORBA.Object $result = null; 376 $result = this.resolve (n); 377 out = $rh.createReply(); 378 org.omg.CORBA.ObjectHelper.write (out, $result); 379 } catch (org.omg.CosNaming.NamingContextPackage.NotFound $ex) { 380 out = $rh.createExceptionReply (); 381 org.omg.CosNaming.NamingContextPackage.NotFoundHelper.write (out, $ex); 382 } catch (org.omg.CosNaming.NamingContextPackage.CannotProceed $ex) { 383 out = $rh.createExceptionReply (); 384 org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.write (out, $ex); 385 } catch (org.omg.CosNaming.NamingContextPackage.InvalidName $ex) { 386 out = $rh.createExceptionReply (); 387 org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.write (out, $ex); 388 } 389 break; 390 } 391 392 393 406 case 9: { 408 try { 409 org.omg.CosNaming.NameComponent n[] = org.omg.CosNaming.NameHelper.read (in); 410 this.unbind (n); 411 out = $rh.createReply(); 412 } catch (org.omg.CosNaming.NamingContextPackage.NotFound $ex) { 413 out = $rh.createExceptionReply (); 414 org.omg.CosNaming.NamingContextPackage.NotFoundHelper.write (out, $ex); 415 } catch (org.omg.CosNaming.NamingContextPackage.CannotProceed $ex) { 416 out = $rh.createExceptionReply (); 417 org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.write (out, $ex); 418 } catch (org.omg.CosNaming.NamingContextPackage.InvalidName $ex) { 419 out = $rh.createExceptionReply (); 420 org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.write (out, $ex); 421 } 422 break; 423 } 424 425 426 446 case 10: { 448 int how_many = in.read_ulong (); 449 org.omg.CosNaming.BindingListHolder bl = new org.omg.CosNaming.BindingListHolder (); 450 org.omg.CosNaming.BindingIteratorHolder bi = new org.omg.CosNaming.BindingIteratorHolder (); 451 this.list (how_many, bl, bi); 452 out = $rh.createReply(); 453 org.omg.CosNaming.BindingListHelper.write (out, bl.value); 454 org.omg.CosNaming.BindingIteratorHelper.write (out, bi.value); 455 break; 456 } 457 458 459 464 case 11: { 466 org.omg.CosNaming.NamingContext $result = null; 467 $result = this.new_context (); 468 out = $rh.createReply(); 469 org.omg.CosNaming.NamingContextHelper.write (out, $result); 470 break; 471 } 472 473 474 494 case 12: { 496 try { 497 org.omg.CosNaming.NameComponent n[] = org.omg.CosNaming.NameHelper.read (in); 498 org.omg.CosNaming.NamingContext $result = null; 499 $result = this.bind_new_context (n); 500 out = $rh.createReply(); 501 org.omg.CosNaming.NamingContextHelper.write (out, $result); 502 } catch (org.omg.CosNaming.NamingContextPackage.NotFound $ex) { 503 out = $rh.createExceptionReply (); 504 org.omg.CosNaming.NamingContextPackage.NotFoundHelper.write (out, $ex); 505 } catch (org.omg.CosNaming.NamingContextPackage.AlreadyBound $ex) { 506 out = $rh.createExceptionReply (); 507 org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.write (out, $ex); 508 } catch (org.omg.CosNaming.NamingContextPackage.CannotProceed $ex) { 509 out = $rh.createExceptionReply (); 510 org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.write (out, $ex); 511 } catch (org.omg.CosNaming.NamingContextPackage.InvalidName $ex) { 512 out = $rh.createExceptionReply (); 513 org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.write (out, $ex); 514 } 515 break; 516 } 517 518 519 525 case 13: { 527 try { 528 this.destroy (); 529 out = $rh.createReply(); 530 } catch (org.omg.CosNaming.NamingContextPackage.NotEmpty $ex) { 531 out = $rh.createExceptionReply (); 532 org.omg.CosNaming.NamingContextPackage.NotEmptyHelper.write (out, $ex); 533 } 534 break; 535 } 536 537 default: 538 throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); 539 } 540 541 return out; 542 } 544 private static String [] __ids = { 546 "IDL:omg.org/CosNaming/NamingContextExt:1.0", 547 "IDL:omg.org/CosNaming/NamingContext:1.0"}; 548 549 public String [] _all_interfaces (org.omg.PortableServer.POA poa, byte[] objectId) 550 { 551 return (String [])__ids.clone (); 552 } 553 554 public NamingContextExt _this() 555 { 556 return NamingContextExtHelper.narrow( 557 super._this_object()); 558 } 559 560 public NamingContextExt _this(org.omg.CORBA.ORB orb) 561 { 562 return NamingContextExtHelper.narrow( 563 super._this_object(orb)); 564 } 565 566 567 } | Popular Tags |