001 package org.omg.CosNaming; 002 003 004 /** 005 * Generated from IDL interface "NamingContext". 006 * 007 * @author JacORB IDL compiler V 2.3.0 (JBoss patch 6), 06-Jun-2007 008 * @version generated at Jun 18, 2012 10:36:59 AM 009 */ 010 011 public class _NamingContextStub 012 extends org.omg.CORBA.portable.ObjectImpl 013 implements org.omg.CosNaming.NamingContext 014 { 015 private String[] ids = {"IDL:omg.org/CosNaming/NamingContext:1.0"}; 016 public String[] _ids() 017 { 018 return ids; 019 } 020 021 public final static java.lang.Class _opsClass = org.omg.CosNaming.NamingContextOperations.class; 022 public void list(int how_many, org.omg.CosNaming.BindingListHolder bl, org.omg.CosNaming.BindingIteratorHolder bi) 023 { 024 while(true) 025 { 026 if(! this._is_local()) 027 { 028 org.omg.CORBA.portable.InputStream _is = null; 029 try 030 { 031 org.omg.CORBA.portable.OutputStream _os = _request( "list", true); 032 _os.write_ulong(how_many); 033 _is = _invoke(_os); 034 bl.value = org.omg.CosNaming.BindingListHelper.read(_is); 035 bi.value = org.omg.CosNaming.BindingIteratorHelper.read(_is); 036 return; 037 } 038 catch( org.omg.CORBA.portable.RemarshalException _rx ){} 039 catch( org.omg.CORBA.portable.ApplicationException _ax ) 040 { 041 String _id = _ax.getId(); 042 throw new RuntimeException("Unexpected exception " + _id ); 043 } 044 finally 045 { 046 this._releaseReply(_is); 047 } 048 } 049 else 050 { 051 org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "list", _opsClass ); 052 if( _so == null ) 053 throw new org.omg.CORBA.UNKNOWN("local invocations not supported!"); 054 NamingContextOperations _localServant = (NamingContextOperations)_so.servant; 055 try 056 { 057 _localServant.list(how_many,bl,bi); 058 } 059 finally 060 { 061 _servant_postinvoke(_so); 062 } 063 return; 064 } 065 066 } 067 068 } 069 070 public void bind(org.omg.CosNaming.NameComponent[] n, org.omg.CORBA.Object obj) throws org.omg.CosNaming.NamingContextPackage.NotFound,org.omg.CosNaming.NamingContextPackage.AlreadyBound,org.omg.CosNaming.NamingContextPackage.CannotProceed,org.omg.CosNaming.NamingContextPackage.InvalidName 071 { 072 while(true) 073 { 074 if(! this._is_local()) 075 { 076 org.omg.CORBA.portable.InputStream _is = null; 077 try 078 { 079 org.omg.CORBA.portable.OutputStream _os = _request( "bind", true); 080 org.omg.CosNaming.NameHelper.write(_os,n); 081 _os.write_Object(obj); 082 _is = _invoke(_os); 083 return; 084 } 085 catch( org.omg.CORBA.portable.RemarshalException _rx ){} 086 catch( org.omg.CORBA.portable.ApplicationException _ax ) 087 { 088 String _id = _ax.getId(); 089 if( _id.equals("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0")) 090 { 091 throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(_ax.getInputStream()); 092 } 093 else if( _id.equals("IDL:omg.org/CosNaming/NamingContext/AlreadyBound:1.0")) 094 { 095 throw org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.read(_ax.getInputStream()); 096 } 097 else if( _id.equals("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0")) 098 { 099 throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read(_ax.getInputStream()); 100 } 101 else if( _id.equals("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0")) 102 { 103 throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read(_ax.getInputStream()); 104 } 105 throw new RuntimeException("Unexpected exception " + _id ); 106 } 107 finally 108 { 109 this._releaseReply(_is); 110 } 111 } 112 else 113 { 114 org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "bind", _opsClass ); 115 if( _so == null ) 116 throw new org.omg.CORBA.UNKNOWN("local invocations not supported!"); 117 NamingContextOperations _localServant = (NamingContextOperations)_so.servant; 118 try 119 { 120 _localServant.bind(n,obj); 121 } 122 finally 123 { 124 _servant_postinvoke(_so); 125 } 126 return; 127 } 128 129 } 130 131 } 132 133 public org.omg.CosNaming.NamingContext bind_new_context(org.omg.CosNaming.NameComponent[] n) throws org.omg.CosNaming.NamingContextPackage.NotFound,org.omg.CosNaming.NamingContextPackage.CannotProceed,org.omg.CosNaming.NamingContextPackage.AlreadyBound,org.omg.CosNaming.NamingContextPackage.InvalidName 134 { 135 while(true) 136 { 137 if(! this._is_local()) 138 { 139 org.omg.CORBA.portable.InputStream _is = null; 140 try 141 { 142 org.omg.CORBA.portable.OutputStream _os = _request( "bind_new_context", true); 143 org.omg.CosNaming.NameHelper.write(_os,n); 144 _is = _invoke(_os); 145 org.omg.CosNaming.NamingContext _result = org.omg.CosNaming.NamingContextHelper.read(_is); 146 return _result; 147 } 148 catch( org.omg.CORBA.portable.RemarshalException _rx ){} 149 catch( org.omg.CORBA.portable.ApplicationException _ax ) 150 { 151 String _id = _ax.getId(); 152 if( _id.equals("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0")) 153 { 154 throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(_ax.getInputStream()); 155 } 156 else if( _id.equals("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0")) 157 { 158 throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read(_ax.getInputStream()); 159 } 160 else if( _id.equals("IDL:omg.org/CosNaming/NamingContext/AlreadyBound:1.0")) 161 { 162 throw org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.read(_ax.getInputStream()); 163 } 164 else if( _id.equals("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0")) 165 { 166 throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read(_ax.getInputStream()); 167 } 168 throw new RuntimeException("Unexpected exception " + _id ); 169 } 170 finally 171 { 172 this._releaseReply(_is); 173 } 174 } 175 else 176 { 177 org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "bind_new_context", _opsClass ); 178 if( _so == null ) 179 throw new org.omg.CORBA.UNKNOWN("local invocations not supported!"); 180 NamingContextOperations _localServant = (NamingContextOperations)_so.servant; 181 org.omg.CosNaming.NamingContext _result; 182 try 183 { 184 _result = _localServant.bind_new_context(n); 185 } 186 finally 187 { 188 _servant_postinvoke(_so); 189 } 190 return _result; 191 } 192 193 } 194 195 } 196 197 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 198 { 199 while(true) 200 { 201 if(! this._is_local()) 202 { 203 org.omg.CORBA.portable.InputStream _is = null; 204 try 205 { 206 org.omg.CORBA.portable.OutputStream _os = _request( "rebind_context", true); 207 org.omg.CosNaming.NameHelper.write(_os,n); 208 org.omg.CosNaming.NamingContextHelper.write(_os,nc); 209 _is = _invoke(_os); 210 return; 211 } 212 catch( org.omg.CORBA.portable.RemarshalException _rx ){} 213 catch( org.omg.CORBA.portable.ApplicationException _ax ) 214 { 215 String _id = _ax.getId(); 216 if( _id.equals("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0")) 217 { 218 throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(_ax.getInputStream()); 219 } 220 else if( _id.equals("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0")) 221 { 222 throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read(_ax.getInputStream()); 223 } 224 else if( _id.equals("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0")) 225 { 226 throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read(_ax.getInputStream()); 227 } 228 throw new RuntimeException("Unexpected exception " + _id ); 229 } 230 finally 231 { 232 this._releaseReply(_is); 233 } 234 } 235 else 236 { 237 org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "rebind_context", _opsClass ); 238 if( _so == null ) 239 throw new org.omg.CORBA.UNKNOWN("local invocations not supported!"); 240 NamingContextOperations _localServant = (NamingContextOperations)_so.servant; 241 try 242 { 243 _localServant.rebind_context(n,nc); 244 } 245 finally 246 { 247 _servant_postinvoke(_so); 248 } 249 return; 250 } 251 252 } 253 254 } 255 256 public void bind_context(org.omg.CosNaming.NameComponent[] n, org.omg.CosNaming.NamingContext nc) throws org.omg.CosNaming.NamingContextPackage.NotFound,org.omg.CosNaming.NamingContextPackage.AlreadyBound,org.omg.CosNaming.NamingContextPackage.CannotProceed,org.omg.CosNaming.NamingContextPackage.InvalidName 257 { 258 while(true) 259 { 260 if(! this._is_local()) 261 { 262 org.omg.CORBA.portable.InputStream _is = null; 263 try 264 { 265 org.omg.CORBA.portable.OutputStream _os = _request( "bind_context", true); 266 org.omg.CosNaming.NameHelper.write(_os,n); 267 org.omg.CosNaming.NamingContextHelper.write(_os,nc); 268 _is = _invoke(_os); 269 return; 270 } 271 catch( org.omg.CORBA.portable.RemarshalException _rx ){} 272 catch( org.omg.CORBA.portable.ApplicationException _ax ) 273 { 274 String _id = _ax.getId(); 275 if( _id.equals("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0")) 276 { 277 throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(_ax.getInputStream()); 278 } 279 else if( _id.equals("IDL:omg.org/CosNaming/NamingContext/AlreadyBound:1.0")) 280 { 281 throw org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.read(_ax.getInputStream()); 282 } 283 else if( _id.equals("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0")) 284 { 285 throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read(_ax.getInputStream()); 286 } 287 else if( _id.equals("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0")) 288 { 289 throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read(_ax.getInputStream()); 290 } 291 throw new RuntimeException("Unexpected exception " + _id ); 292 } 293 finally 294 { 295 this._releaseReply(_is); 296 } 297 } 298 else 299 { 300 org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "bind_context", _opsClass ); 301 if( _so == null ) 302 throw new org.omg.CORBA.UNKNOWN("local invocations not supported!"); 303 NamingContextOperations _localServant = (NamingContextOperations)_so.servant; 304 try 305 { 306 _localServant.bind_context(n,nc); 307 } 308 finally 309 { 310 _servant_postinvoke(_so); 311 } 312 return; 313 } 314 315 } 316 317 } 318 319 public void unbind(org.omg.CosNaming.NameComponent[] n) throws org.omg.CosNaming.NamingContextPackage.NotFound,org.omg.CosNaming.NamingContextPackage.CannotProceed,org.omg.CosNaming.NamingContextPackage.InvalidName 320 { 321 while(true) 322 { 323 if(! this._is_local()) 324 { 325 org.omg.CORBA.portable.InputStream _is = null; 326 try 327 { 328 org.omg.CORBA.portable.OutputStream _os = _request( "unbind", true); 329 org.omg.CosNaming.NameHelper.write(_os,n); 330 _is = _invoke(_os); 331 return; 332 } 333 catch( org.omg.CORBA.portable.RemarshalException _rx ){} 334 catch( org.omg.CORBA.portable.ApplicationException _ax ) 335 { 336 String _id = _ax.getId(); 337 if( _id.equals("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0")) 338 { 339 throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(_ax.getInputStream()); 340 } 341 else if( _id.equals("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0")) 342 { 343 throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read(_ax.getInputStream()); 344 } 345 else if( _id.equals("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0")) 346 { 347 throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read(_ax.getInputStream()); 348 } 349 throw new RuntimeException("Unexpected exception " + _id ); 350 } 351 finally 352 { 353 this._releaseReply(_is); 354 } 355 } 356 else 357 { 358 org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "unbind", _opsClass ); 359 if( _so == null ) 360 throw new org.omg.CORBA.UNKNOWN("local invocations not supported!"); 361 NamingContextOperations _localServant = (NamingContextOperations)_so.servant; 362 try 363 { 364 _localServant.unbind(n); 365 } 366 finally 367 { 368 _servant_postinvoke(_so); 369 } 370 return; 371 } 372 373 } 374 375 } 376 377 public org.omg.CosNaming.NamingContext new_context() 378 { 379 while(true) 380 { 381 if(! this._is_local()) 382 { 383 org.omg.CORBA.portable.InputStream _is = null; 384 try 385 { 386 org.omg.CORBA.portable.OutputStream _os = _request( "new_context", true); 387 _is = _invoke(_os); 388 org.omg.CosNaming.NamingContext _result = org.omg.CosNaming.NamingContextHelper.read(_is); 389 return _result; 390 } 391 catch( org.omg.CORBA.portable.RemarshalException _rx ){} 392 catch( org.omg.CORBA.portable.ApplicationException _ax ) 393 { 394 String _id = _ax.getId(); 395 throw new RuntimeException("Unexpected exception " + _id ); 396 } 397 finally 398 { 399 this._releaseReply(_is); 400 } 401 } 402 else 403 { 404 org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "new_context", _opsClass ); 405 if( _so == null ) 406 throw new org.omg.CORBA.UNKNOWN("local invocations not supported!"); 407 NamingContextOperations _localServant = (NamingContextOperations)_so.servant; 408 org.omg.CosNaming.NamingContext _result; 409 try 410 { 411 _result = _localServant.new_context(); 412 } 413 finally 414 { 415 _servant_postinvoke(_so); 416 } 417 return _result; 418 } 419 420 } 421 422 } 423 424 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 425 { 426 while(true) 427 { 428 if(! this._is_local()) 429 { 430 org.omg.CORBA.portable.InputStream _is = null; 431 try 432 { 433 org.omg.CORBA.portable.OutputStream _os = _request( "rebind", true); 434 org.omg.CosNaming.NameHelper.write(_os,n); 435 _os.write_Object(obj); 436 _is = _invoke(_os); 437 return; 438 } 439 catch( org.omg.CORBA.portable.RemarshalException _rx ){} 440 catch( org.omg.CORBA.portable.ApplicationException _ax ) 441 { 442 String _id = _ax.getId(); 443 if( _id.equals("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0")) 444 { 445 throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(_ax.getInputStream()); 446 } 447 else if( _id.equals("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0")) 448 { 449 throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read(_ax.getInputStream()); 450 } 451 else if( _id.equals("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0")) 452 { 453 throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read(_ax.getInputStream()); 454 } 455 throw new RuntimeException("Unexpected exception " + _id ); 456 } 457 finally 458 { 459 this._releaseReply(_is); 460 } 461 } 462 else 463 { 464 org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "rebind", _opsClass ); 465 if( _so == null ) 466 throw new org.omg.CORBA.UNKNOWN("local invocations not supported!"); 467 NamingContextOperations _localServant = (NamingContextOperations)_so.servant; 468 try 469 { 470 _localServant.rebind(n,obj); 471 } 472 finally 473 { 474 _servant_postinvoke(_so); 475 } 476 return; 477 } 478 479 } 480 481 } 482 483 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 484 { 485 while(true) 486 { 487 if(! this._is_local()) 488 { 489 org.omg.CORBA.portable.InputStream _is = null; 490 try 491 { 492 org.omg.CORBA.portable.OutputStream _os = _request( "resolve", true); 493 org.omg.CosNaming.NameHelper.write(_os,n); 494 _is = _invoke(_os); 495 org.omg.CORBA.Object _result = _is.read_Object(); 496 return _result; 497 } 498 catch( org.omg.CORBA.portable.RemarshalException _rx ){} 499 catch( org.omg.CORBA.portable.ApplicationException _ax ) 500 { 501 String _id = _ax.getId(); 502 if( _id.equals("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0")) 503 { 504 throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(_ax.getInputStream()); 505 } 506 else if( _id.equals("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0")) 507 { 508 throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read(_ax.getInputStream()); 509 } 510 else if( _id.equals("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0")) 511 { 512 throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read(_ax.getInputStream()); 513 } 514 throw new RuntimeException("Unexpected exception " + _id ); 515 } 516 finally 517 { 518 this._releaseReply(_is); 519 } 520 } 521 else 522 { 523 org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "resolve", _opsClass ); 524 if( _so == null ) 525 throw new org.omg.CORBA.UNKNOWN("local invocations not supported!"); 526 NamingContextOperations _localServant = (NamingContextOperations)_so.servant; 527 org.omg.CORBA.Object _result; 528 try 529 { 530 _result = _localServant.resolve(n); 531 } 532 finally 533 { 534 _servant_postinvoke(_so); 535 } 536 return _result; 537 } 538 539 } 540 541 } 542 543 }