1 package gcc.rmi.iiop; 2 3 4 10 11 public class _NameServiceStub extends org.omg.CORBA.portable.ObjectImpl implements gcc.rmi.iiop.NameService 12 { 13 14 public String resolve_host (String host) 15 { 16 org.omg.CORBA.portable.InputStream $in = null; 17 try { 18 org.omg.CORBA.portable.OutputStream $out = _request ("resolve_host", true); 19 $out.write_string (host); 20 $in = _invoke ($out); 21 String $result = $in.read_string (); 22 return $result; 23 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 24 $in = $ex.getInputStream (); 25 String _id = $ex.getId (); 26 throw new org.omg.CORBA.MARSHAL (_id); 27 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 28 return resolve_host (host ); 29 } finally { 30 _releaseReply ($in); 31 } 32 } 34 35 43 public String to_string (gcc.org.omg.CosNaming.NameComponent[] n) throws gcc.org.omg.CosNaming.NamingContextPackage.InvalidName 44 { 45 org.omg.CORBA.portable.InputStream $in = null; 46 try { 47 org.omg.CORBA.portable.OutputStream $out = _request ("to_string", true); 48 gcc.org.omg.CosNaming.NameHelper.write ($out, n); 49 $in = _invoke ($out); 50 String $result = gcc.org.omg.CosNaming.NamingContextExtPackage.StringNameHelper.read ($in); 51 return $result; 52 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 53 $in = $ex.getInputStream (); 54 String _id = $ex.getId (); 55 if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0")) 56 throw gcc.org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in); 57 else 58 throw new org.omg.CORBA.MARSHAL (_id); 59 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 60 return to_string (n ); 61 } finally { 62 _releaseReply ($in); 63 } 64 } 66 67 75 public gcc.org.omg.CosNaming.NameComponent[] to_name (String sn) throws gcc.org.omg.CosNaming.NamingContextPackage.InvalidName 76 { 77 org.omg.CORBA.portable.InputStream $in = null; 78 try { 79 org.omg.CORBA.portable.OutputStream $out = _request ("to_name", true); 80 gcc.org.omg.CosNaming.NamingContextExtPackage.StringNameHelper.write ($out, sn); 81 $in = _invoke ($out); 82 gcc.org.omg.CosNaming.NameComponent $result[] = gcc.org.omg.CosNaming.NameHelper.read ($in); 83 return $result; 84 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 85 $in = $ex.getInputStream (); 86 String _id = $ex.getId (); 87 if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0")) 88 throw gcc.org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in); 89 else 90 throw new org.omg.CORBA.MARSHAL (_id); 91 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 92 return to_name (sn ); 93 } finally { 94 _releaseReply ($in); 95 } 96 } 98 99 111 public String to_url (String addr, String sn) throws gcc.org.omg.CosNaming.NamingContextExtPackage.InvalidAddress, gcc.org.omg.CosNaming.NamingContextPackage.InvalidName 112 { 113 org.omg.CORBA.portable.InputStream $in = null; 114 try { 115 org.omg.CORBA.portable.OutputStream $out = _request ("to_url", true); 116 gcc.org.omg.CosNaming.NamingContextExtPackage.AddressHelper.write ($out, addr); 117 gcc.org.omg.CosNaming.NamingContextExtPackage.StringNameHelper.write ($out, sn); 118 $in = _invoke ($out); 119 String $result = gcc.org.omg.CosNaming.NamingContextExtPackage.URLStringHelper.read ($in); 120 return $result; 121 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 122 $in = $ex.getInputStream (); 123 String _id = $ex.getId (); 124 if (_id.equals ("IDL:omg.org/CosNaming/NamingContextExt/InvalidAddress:1.0")) 125 throw gcc.org.omg.CosNaming.NamingContextExtPackage.InvalidAddressHelper.read ($in); 126 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0")) 127 throw gcc.org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in); 128 else 129 throw new org.omg.CORBA.MARSHAL (_id); 130 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 131 return to_url (addr, sn ); 132 } finally { 133 _releaseReply ($in); 134 } 135 } 137 138 156 public org.omg.CORBA.Object resolve_str (String n) throws gcc.org.omg.CosNaming.NamingContextPackage.NotFound, gcc.org.omg.CosNaming.NamingContextPackage.CannotProceed, gcc.org.omg.CosNaming.NamingContextPackage.InvalidName 157 { 158 org.omg.CORBA.portable.InputStream $in = null; 159 try { 160 org.omg.CORBA.portable.OutputStream $out = _request ("resolve_str", true); 161 gcc.org.omg.CosNaming.NamingContextExtPackage.StringNameHelper.write ($out, n); 162 $in = _invoke ($out); 163 org.omg.CORBA.Object $result = org.omg.CORBA.ObjectHelper.read ($in); 164 return $result; 165 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 166 $in = $ex.getInputStream (); 167 String _id = $ex.getId (); 168 if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0")) 169 throw gcc.org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in); 170 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0")) 171 throw gcc.org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in); 172 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0")) 173 throw gcc.org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in); 174 else 175 throw new org.omg.CORBA.MARSHAL (_id); 176 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 177 return resolve_str (n ); 178 } finally { 179 _releaseReply ($in); 180 } 181 } 183 184 204 public void bind (gcc.org.omg.CosNaming.NameComponent[] n, org.omg.CORBA.Object obj) throws gcc.org.omg.CosNaming.NamingContextPackage.NotFound, gcc.org.omg.CosNaming.NamingContextPackage.CannotProceed, gcc.org.omg.CosNaming.NamingContextPackage.InvalidName, gcc.org.omg.CosNaming.NamingContextPackage.AlreadyBound 205 { 206 org.omg.CORBA.portable.InputStream $in = null; 207 try { 208 org.omg.CORBA.portable.OutputStream $out = _request ("bind", true); 209 gcc.org.omg.CosNaming.NameHelper.write ($out, n); 210 org.omg.CORBA.ObjectHelper.write ($out, obj); 211 $in = _invoke ($out); 212 return; 213 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 214 $in = $ex.getInputStream (); 215 String _id = $ex.getId (); 216 if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0")) 217 throw gcc.org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in); 218 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0")) 219 throw gcc.org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in); 220 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0")) 221 throw gcc.org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in); 222 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/AlreadyBound:1.0")) 223 throw gcc.org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.read ($in); 224 else 225 throw new org.omg.CORBA.MARSHAL (_id); 226 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 227 bind (n, obj ); 228 } finally { 229 _releaseReply ($in); 230 } 231 } 233 234 254 public void bind_context (gcc.org.omg.CosNaming.NameComponent[] n, gcc.org.omg.CosNaming.NamingContext nc) throws gcc.org.omg.CosNaming.NamingContextPackage.NotFound, gcc.org.omg.CosNaming.NamingContextPackage.CannotProceed, gcc.org.omg.CosNaming.NamingContextPackage.InvalidName, gcc.org.omg.CosNaming.NamingContextPackage.AlreadyBound 255 { 256 org.omg.CORBA.portable.InputStream $in = null; 257 try { 258 org.omg.CORBA.portable.OutputStream $out = _request ("bind_context", true); 259 gcc.org.omg.CosNaming.NameHelper.write ($out, n); 260 gcc.org.omg.CosNaming.NamingContextHelper.write ($out, nc); 261 $in = _invoke ($out); 262 return; 263 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 264 $in = $ex.getInputStream (); 265 String _id = $ex.getId (); 266 if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0")) 267 throw gcc.org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in); 268 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0")) 269 throw gcc.org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in); 270 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0")) 271 throw gcc.org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in); 272 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/AlreadyBound:1.0")) 273 throw gcc.org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.read ($in); 274 else 275 throw new org.omg.CORBA.MARSHAL (_id); 276 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 277 bind_context (n, nc ); 278 } finally { 279 _releaseReply ($in); 280 } 281 } 283 284 302 public void rebind (gcc.org.omg.CosNaming.NameComponent[] n, org.omg.CORBA.Object obj) throws gcc.org.omg.CosNaming.NamingContextPackage.NotFound, gcc.org.omg.CosNaming.NamingContextPackage.CannotProceed, gcc.org.omg.CosNaming.NamingContextPackage.InvalidName 303 { 304 org.omg.CORBA.portable.InputStream $in = null; 305 try { 306 org.omg.CORBA.portable.OutputStream $out = _request ("rebind", true); 307 gcc.org.omg.CosNaming.NameHelper.write ($out, n); 308 org.omg.CORBA.ObjectHelper.write ($out, obj); 309 $in = _invoke ($out); 310 return; 311 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 312 $in = $ex.getInputStream (); 313 String _id = $ex.getId (); 314 if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0")) 315 throw gcc.org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in); 316 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0")) 317 throw gcc.org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in); 318 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0")) 319 throw gcc.org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in); 320 else 321 throw new org.omg.CORBA.MARSHAL (_id); 322 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 323 rebind (n, obj ); 324 } finally { 325 _releaseReply ($in); 326 } 327 } 329 330 348 public void rebind_context (gcc.org.omg.CosNaming.NameComponent[] n, gcc.org.omg.CosNaming.NamingContext nc) throws gcc.org.omg.CosNaming.NamingContextPackage.NotFound, gcc.org.omg.CosNaming.NamingContextPackage.CannotProceed, gcc.org.omg.CosNaming.NamingContextPackage.InvalidName 349 { 350 org.omg.CORBA.portable.InputStream $in = null; 351 try { 352 org.omg.CORBA.portable.OutputStream $out = _request ("rebind_context", true); 353 gcc.org.omg.CosNaming.NameHelper.write ($out, n); 354 gcc.org.omg.CosNaming.NamingContextHelper.write ($out, nc); 355 $in = _invoke ($out); 356 return; 357 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 358 $in = $ex.getInputStream (); 359 String _id = $ex.getId (); 360 if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0")) 361 throw gcc.org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in); 362 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0")) 363 throw gcc.org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in); 364 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0")) 365 throw gcc.org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in); 366 else 367 throw new org.omg.CORBA.MARSHAL (_id); 368 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 369 rebind_context (n, nc ); 370 } finally { 371 _releaseReply ($in); 372 } 373 } 375 376 394 public org.omg.CORBA.Object resolve (gcc.org.omg.CosNaming.NameComponent[] n) throws gcc.org.omg.CosNaming.NamingContextPackage.NotFound, gcc.org.omg.CosNaming.NamingContextPackage.CannotProceed, gcc.org.omg.CosNaming.NamingContextPackage.InvalidName 395 { 396 org.omg.CORBA.portable.InputStream $in = null; 397 try { 398 org.omg.CORBA.portable.OutputStream $out = _request ("resolve", true); 399 gcc.org.omg.CosNaming.NameHelper.write ($out, n); 400 $in = _invoke ($out); 401 org.omg.CORBA.Object $result = org.omg.CORBA.ObjectHelper.read ($in); 402 return $result; 403 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 404 $in = $ex.getInputStream (); 405 String _id = $ex.getId (); 406 if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0")) 407 throw gcc.org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in); 408 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0")) 409 throw gcc.org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in); 410 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0")) 411 throw gcc.org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in); 412 else 413 throw new org.omg.CORBA.MARSHAL (_id); 414 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 415 return resolve (n ); 416 } finally { 417 _releaseReply ($in); 418 } 419 } 421 422 435 public void unbind (gcc.org.omg.CosNaming.NameComponent[] n) throws gcc.org.omg.CosNaming.NamingContextPackage.NotFound, gcc.org.omg.CosNaming.NamingContextPackage.CannotProceed, gcc.org.omg.CosNaming.NamingContextPackage.InvalidName 436 { 437 org.omg.CORBA.portable.InputStream $in = null; 438 try { 439 org.omg.CORBA.portable.OutputStream $out = _request ("unbind", true); 440 gcc.org.omg.CosNaming.NameHelper.write ($out, n); 441 $in = _invoke ($out); 442 return; 443 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 444 $in = $ex.getInputStream (); 445 String _id = $ex.getId (); 446 if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0")) 447 throw gcc.org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in); 448 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0")) 449 throw gcc.org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in); 450 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0")) 451 throw gcc.org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in); 452 else 453 throw new org.omg.CORBA.MARSHAL (_id); 454 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 455 unbind (n ); 456 } finally { 457 _releaseReply ($in); 458 } 459 } 461 462 482 public void list (int how_many, gcc.org.omg.CosNaming.BindingListHolder bl, gcc.org.omg.CosNaming.BindingIteratorHolder bi) 483 { 484 org.omg.CORBA.portable.InputStream $in = null; 485 try { 486 org.omg.CORBA.portable.OutputStream $out = _request ("list", true); 487 $out.write_ulong (how_many); 488 $in = _invoke ($out); 489 bl.value = gcc.org.omg.CosNaming.BindingListHelper.read ($in); 490 bi.value = gcc.org.omg.CosNaming.BindingIteratorHelper.read ($in); 491 return; 492 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 493 $in = $ex.getInputStream (); 494 String _id = $ex.getId (); 495 throw new org.omg.CORBA.MARSHAL (_id); 496 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 497 list (how_many, bl, bi ); 498 } finally { 499 _releaseReply ($in); 500 } 501 } 503 504 509 public gcc.org.omg.CosNaming.NamingContext new_context () 510 { 511 org.omg.CORBA.portable.InputStream $in = null; 512 try { 513 org.omg.CORBA.portable.OutputStream $out = _request ("new_context", true); 514 $in = _invoke ($out); 515 gcc.org.omg.CosNaming.NamingContext $result = gcc.org.omg.CosNaming.NamingContextHelper.read ($in); 516 return $result; 517 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 518 $in = $ex.getInputStream (); 519 String _id = $ex.getId (); 520 throw new org.omg.CORBA.MARSHAL (_id); 521 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 522 return new_context ( ); 523 } finally { 524 _releaseReply ($in); 525 } 526 } 528 529 549 public gcc.org.omg.CosNaming.NamingContext bind_new_context (gcc.org.omg.CosNaming.NameComponent[] n) throws gcc.org.omg.CosNaming.NamingContextPackage.NotFound, gcc.org.omg.CosNaming.NamingContextPackage.AlreadyBound, gcc.org.omg.CosNaming.NamingContextPackage.CannotProceed, gcc.org.omg.CosNaming.NamingContextPackage.InvalidName 550 { 551 org.omg.CORBA.portable.InputStream $in = null; 552 try { 553 org.omg.CORBA.portable.OutputStream $out = _request ("bind_new_context", true); 554 gcc.org.omg.CosNaming.NameHelper.write ($out, n); 555 $in = _invoke ($out); 556 gcc.org.omg.CosNaming.NamingContext $result = gcc.org.omg.CosNaming.NamingContextHelper.read ($in); 557 return $result; 558 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 559 $in = $ex.getInputStream (); 560 String _id = $ex.getId (); 561 if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0")) 562 throw gcc.org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in); 563 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/AlreadyBound:1.0")) 564 throw gcc.org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.read ($in); 565 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0")) 566 throw gcc.org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in); 567 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0")) 568 throw gcc.org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in); 569 else 570 throw new org.omg.CORBA.MARSHAL (_id); 571 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 572 return bind_new_context (n ); 573 } finally { 574 _releaseReply ($in); 575 } 576 } 578 private static String[] __ids = { 580 "IDL:gcc/rmi/iiop/NameService:1.0", 581 "IDL:omg.org/CosNaming/NamingContextExt:1.0", 582 "IDL:omg.org/CosNaming/NamingContext:1.0"}; 583 584 public String[] _ids () 585 { 586 return (String[])__ids.clone (); 587 } 588 589 private void readObject (java.io.ObjectInputStream s) throws java.io.IOException 590 { 591 String str = s.readUTF (); 592 String[] args = null; 593 java.util.Properties props = null; 594 org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str); 595 org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate (); 596 _set_delegate (delegate); 597 } 598 599 private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException 600 { 601 String[] args = null; 602 java.util.Properties props = null; 603 String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this); 604 s.writeUTF (str); 605 } 606 } | Popular Tags |