1 package org.omg.CosNaming; 2 3 4 10 11 12 21 public class _NamingContextStub extends org.omg.CORBA.portable.ObjectImpl implements org.omg.CosNaming.NamingContext 22 { 23 24 25 48 public void bind (org.omg.CosNaming.NameComponent [] n, org.omg.CORBA.Object obj) throws org.omg.CosNaming.NamingContextPackage.NotFound , org.omg.CosNaming.NamingContextPackage.CannotProceed , org.omg.CosNaming.NamingContextPackage.InvalidName , org.omg.CosNaming.NamingContextPackage.AlreadyBound 49 { 50 org.omg.CORBA.portable.InputStream $in = null; 51 try { 52 org.omg.CORBA.portable.OutputStream $out = _request ("bind", true); 53 org.omg.CosNaming.NameHelper.write ($out, n); 54 org.omg.CORBA.ObjectHelper.write ($out, obj); 55 $in = _invoke ($out); 56 return; 57 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 58 $in = $ex.getInputStream (); 59 String _id = $ex.getId (); 60 if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0")) 61 throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in); 62 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0")) 63 throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in); 64 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0")) 65 throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in); 66 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/AlreadyBound:1.0")) 67 throw org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.read ($in); 68 else 69 throw new org.omg.CORBA.MARSHAL (_id); 70 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 71 bind (n, obj ); 72 } finally { 73 _releaseReply ($in); 74 } 75 } 77 78 98 public void bind_context (org.omg.CosNaming.NameComponent [] n, org.omg.CosNaming.NamingContext nc) throws org.omg.CosNaming.NamingContextPackage.NotFound , org.omg.CosNaming.NamingContextPackage.CannotProceed , org.omg.CosNaming.NamingContextPackage.InvalidName , org.omg.CosNaming.NamingContextPackage.AlreadyBound 99 { 100 org.omg.CORBA.portable.InputStream $in = null; 101 try { 102 org.omg.CORBA.portable.OutputStream $out = _request ("bind_context", true); 103 org.omg.CosNaming.NameHelper.write ($out, n); 104 org.omg.CosNaming.NamingContextHelper.write ($out, nc); 105 $in = _invoke ($out); 106 return; 107 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 108 $in = $ex.getInputStream (); 109 String _id = $ex.getId (); 110 if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0")) 111 throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in); 112 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0")) 113 throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in); 114 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0")) 115 throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in); 116 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/AlreadyBound:1.0")) 117 throw org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.read ($in); 118 else 119 throw new org.omg.CORBA.MARSHAL (_id); 120 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 121 bind_context (n, nc ); 122 } finally { 123 _releaseReply ($in); 124 } 125 } 127 128 146 public void rebind (org.omg.CosNaming.NameComponent [] n, org.omg.CORBA.Object obj) throws org.omg.CosNaming.NamingContextPackage.NotFound , org.omg.CosNaming.NamingContextPackage.CannotProceed , org.omg.CosNaming.NamingContextPackage.InvalidName 147 { 148 org.omg.CORBA.portable.InputStream $in = null; 149 try { 150 org.omg.CORBA.portable.OutputStream $out = _request ("rebind", true); 151 org.omg.CosNaming.NameHelper.write ($out, n); 152 org.omg.CORBA.ObjectHelper.write ($out, obj); 153 $in = _invoke ($out); 154 return; 155 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 156 $in = $ex.getInputStream (); 157 String _id = $ex.getId (); 158 if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0")) 159 throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in); 160 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0")) 161 throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in); 162 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0")) 163 throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in); 164 else 165 throw new org.omg.CORBA.MARSHAL (_id); 166 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 167 rebind (n, obj ); 168 } finally { 169 _releaseReply ($in); 170 } 171 } 173 174 192 public void rebind_context (org.omg.CosNaming.NameComponent [] n, org.omg.CosNaming.NamingContext nc) throws org.omg.CosNaming.NamingContextPackage.NotFound , org.omg.CosNaming.NamingContextPackage.CannotProceed , org.omg.CosNaming.NamingContextPackage.InvalidName 193 { 194 org.omg.CORBA.portable.InputStream $in = null; 195 try { 196 org.omg.CORBA.portable.OutputStream $out = _request ("rebind_context", true); 197 org.omg.CosNaming.NameHelper.write ($out, n); 198 org.omg.CosNaming.NamingContextHelper.write ($out, nc); 199 $in = _invoke ($out); 200 return; 201 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 202 $in = $ex.getInputStream (); 203 String _id = $ex.getId (); 204 if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0")) 205 throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in); 206 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0")) 207 throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in); 208 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0")) 209 throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in); 210 else 211 throw new org.omg.CORBA.MARSHAL (_id); 212 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 213 rebind_context (n, nc ); 214 } finally { 215 _releaseReply ($in); 216 } 217 } 219 220 238 public org.omg.CORBA.Object resolve (org.omg.CosNaming.NameComponent [] n) throws org.omg.CosNaming.NamingContextPackage.NotFound , org.omg.CosNaming.NamingContextPackage.CannotProceed , org.omg.CosNaming.NamingContextPackage.InvalidName 239 { 240 org.omg.CORBA.portable.InputStream $in = null; 241 try { 242 org.omg.CORBA.portable.OutputStream $out = _request ("resolve", true); 243 org.omg.CosNaming.NameHelper.write ($out, n); 244 $in = _invoke ($out); 245 org.omg.CORBA.Object $result = org.omg.CORBA.ObjectHelper.read ($in); 246 return $result; 247 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 248 $in = $ex.getInputStream (); 249 String _id = $ex.getId (); 250 if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0")) 251 throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in); 252 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0")) 253 throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in); 254 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0")) 255 throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in); 256 else 257 throw new org.omg.CORBA.MARSHAL (_id); 258 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 259 return resolve (n ); 260 } finally { 261 _releaseReply ($in); 262 } 263 } 265 266 279 public void unbind (org.omg.CosNaming.NameComponent [] n) throws org.omg.CosNaming.NamingContextPackage.NotFound , org.omg.CosNaming.NamingContextPackage.CannotProceed , org.omg.CosNaming.NamingContextPackage.InvalidName 280 { 281 org.omg.CORBA.portable.InputStream $in = null; 282 try { 283 org.omg.CORBA.portable.OutputStream $out = _request ("unbind", true); 284 org.omg.CosNaming.NameHelper.write ($out, n); 285 $in = _invoke ($out); 286 return; 287 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 288 $in = $ex.getInputStream (); 289 String _id = $ex.getId (); 290 if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0")) 291 throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in); 292 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0")) 293 throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in); 294 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0")) 295 throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in); 296 else 297 throw new org.omg.CORBA.MARSHAL (_id); 298 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 299 unbind (n ); 300 } finally { 301 _releaseReply ($in); 302 } 303 } 305 306 326 public void list (int how_many, org.omg.CosNaming.BindingListHolder bl, org.omg.CosNaming.BindingIteratorHolder bi) 327 { 328 org.omg.CORBA.portable.InputStream $in = null; 329 try { 330 org.omg.CORBA.portable.OutputStream $out = _request ("list", true); 331 $out.write_ulong (how_many); 332 $in = _invoke ($out); 333 bl.value = org.omg.CosNaming.BindingListHelper.read ($in); 334 bi.value = org.omg.CosNaming.BindingIteratorHelper.read ($in); 335 return; 336 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 337 $in = $ex.getInputStream (); 338 String _id = $ex.getId (); 339 throw new org.omg.CORBA.MARSHAL (_id); 340 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 341 list (how_many, bl, bi ); 342 } finally { 343 _releaseReply ($in); 344 } 345 } 347 348 353 public org.omg.CosNaming.NamingContext new_context () 354 { 355 org.omg.CORBA.portable.InputStream $in = null; 356 try { 357 org.omg.CORBA.portable.OutputStream $out = _request ("new_context", true); 358 $in = _invoke ($out); 359 org.omg.CosNaming.NamingContext $result = org.omg.CosNaming.NamingContextHelper.read ($in); 360 return $result; 361 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 362 $in = $ex.getInputStream (); 363 String _id = $ex.getId (); 364 throw new org.omg.CORBA.MARSHAL (_id); 365 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 366 return new_context ( ); 367 } finally { 368 _releaseReply ($in); 369 } 370 } 372 373 393 public org.omg.CosNaming.NamingContext bind_new_context (org.omg.CosNaming.NameComponent [] n) throws org.omg.CosNaming.NamingContextPackage.NotFound , org.omg.CosNaming.NamingContextPackage.AlreadyBound , org.omg.CosNaming.NamingContextPackage.CannotProceed , org.omg.CosNaming.NamingContextPackage.InvalidName 394 { 395 org.omg.CORBA.portable.InputStream $in = null; 396 try { 397 org.omg.CORBA.portable.OutputStream $out = _request ("bind_new_context", true); 398 org.omg.CosNaming.NameHelper.write ($out, n); 399 $in = _invoke ($out); 400 org.omg.CosNaming.NamingContext $result = org.omg.CosNaming.NamingContextHelper.read ($in); 401 return $result; 402 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 403 $in = $ex.getInputStream (); 404 String _id = $ex.getId (); 405 if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0")) 406 throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in); 407 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/AlreadyBound:1.0")) 408 throw org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.read ($in); 409 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0")) 410 throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in); 411 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0")) 412 throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in); 413 else 414 throw new org.omg.CORBA.MARSHAL (_id); 415 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 416 return bind_new_context (n ); 417 } finally { 418 _releaseReply ($in); 419 } 420 } 422 423 429 public void destroy () throws org.omg.CosNaming.NamingContextPackage.NotEmpty 430 { 431 org.omg.CORBA.portable.InputStream $in = null; 432 try { 433 org.omg.CORBA.portable.OutputStream $out = _request ("destroy", true); 434 $in = _invoke ($out); 435 return; 436 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 437 $in = $ex.getInputStream (); 438 String _id = $ex.getId (); 439 if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotEmpty:1.0")) 440 throw org.omg.CosNaming.NamingContextPackage.NotEmptyHelper.read ($in); 441 else 442 throw new org.omg.CORBA.MARSHAL (_id); 443 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 444 destroy ( ); 445 } finally { 446 _releaseReply ($in); 447 } 448 } 450 private static String [] __ids = { 452 "IDL:omg.org/CosNaming/NamingContext:1.0"}; 453 454 public String [] _ids () 455 { 456 return (String [])__ids.clone (); 457 } 458 459 private void readObject (java.io.ObjectInputStream s) throws java.io.IOException 460 { 461 String str = s.readUTF (); 462 String [] args = null; 463 java.util.Properties props = null; 464 org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str); 465 org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl ) obj)._get_delegate (); 466 _set_delegate (delegate); 467 } 468 469 private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException 470 { 471 String [] args = null; 472 java.util.Properties props = null; 473 String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this); 474 s.writeUTF (str); 475 } 476 } | Popular Tags |